Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

SpamStego

by beretboy (Chaplain)
on Apr 22, 2002 at 02:28 UTC ( #160974=sourcecode: print w/ replies, xml ) Need Help??

Category: Cryptography
Author/Contact Info beretboy - root@phrontist.org see phrontist.org for other perl stuff
Description: Inspired by spammimic.com this code turns your message into spam-like text. Especially useful for hiding the true nature of encrypted messages.
#!/usr/bin/perl
use strict;

 my @templates = <DATA>;
    sub gen {
    my $num = @_[0];
    my $num = ord $num;
    my $phrase = @templates[rand @templates];
    $phrase =~ s/NUM/$num/;
    $phrase =~ s/\n//;
    chomp($phrase);
    return $phrase;
    }

    print "Decrypt?\n(y/n)";
    my $mode = <STDIN>;
    chomp($mode);
    system("clear");

if ($mode eq "n") {

$/ = undef;
my $input = <>;
my @chars = split("", $input);
my $foo;

my @names = ("Buisness Professional","Decision Maker","Sir/Mam","Lucky
+ Individual");
my $name = @names[rand @names];
print "Dear " . $name . ",\n\n";

foreach $foo(@chars) {
print gen($foo);
}
}

if ($mode eq "y") {

$/ = undef;
my $input = <>;
my @nums = ($input =~ /(\d*)/g);
my @chars = map(chr, @nums);
my $foo;
foreach $foo(@chars) {
print "$foo";
}

}
__DATA__
EARN YOUR HIGHSCHOOL DIPLOMA IN NUM HOURS OR LESS IN YOUR SPARE TIME!!
+!!!!!!!!
We have helped individuals around the world in NUM countries live the 
+lives they have always dreamed of!!!!!!!
Lose NUM pounds just by SLEEPING!!!!!!!!
Make NUM dollars an hour as an affilliate of a rapid growth marketing 
+firm!!!
This electronic message conforms with senate bill NUM Section A.
Lose weight the quick and easy way, CALL FOR A FREE NUM day sample.
REAL RESULTS IN NUM DAYS!!!!!!!!
TO ORDER CALL YOUR OPERATOR AND ASK FOR EXTENSION NUM!!! OPERATORS STA
+NDING BY!!!!!!!!!!
you can become rich inside NUM DAYS!!!!!!!!!!! 
Jim Jones tried our product and his only problem now is where to park 
+his NUM cars!!!
success is yours is NUM days or less!!!!!!!!
CALL NOW AND GET A FREE GIFT WORTH OVER NUM DOLLARS!!!!!
GENERATE CASH FLOW AND ONLY WORK NUM HOURS EACH YEAR!!!!!!
YOU HAVE BEEN CHOSEN OUT OF NUM LUCKY PEOPLE TO RECIEVE THIS SPECIAL O
+FFER!!!!
comes in NUM delectable flavors!!!
Order in the next NUM days AND YOU MAY WIN A FREE CAR!!!!!!!
Have you ever noticed people love convenience? CAPITALIZE ON THIS LIKE
+ OUR NUM HAPPY affiliates!!!
NEED TO GET OUT OF DEBT? WOULD NUM DOLLARS HELP? OF COURSE IT WOULD!!!
+!
THIS IS NOT SPAM! THIS IS A LEGAL WAY TO MAKE NUM DOLLARS AN HOUR DOIN
+G EASY WORK!!!!!!!!!!!!!
We are licensed to operate in NUM countries. (not garunteed).
Linda Corgetto raves "Your product let me lose NUM pounds and make tho
+usands of dollars!!!!"
FOWARD THIS MESSAGE TO NUM PEOPLE OR DEATH AND ETERNAL MISFORTUNE WILL
+ HAUNT YOUR IMMORTAL SOUL!!!!!!

Comment on SpamStego
Download Code

Back to Code Catacombs

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: sourcecode [id://160974]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2014-10-25 09:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (142 votes), past polls