I haven't tried it yet but, reading through it, I thought it was sort of
tied to the site.  Does it give you control of the messages that it sends (I
don't think I'd want it to look like spam)?  But, either way, I'll
definitely be testing it out soon. -Thanks


-----Original Message-----
From: Mark Thomas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 10:01
To: Jeremiah Fletcher
Subject: RE: Text obfuscating


Have you tried the module I wrote? Just name it Spamcode.pm
and write a script like my sample. Let me know if you do 
that.

- Mark.
 
> That's pretty cool.  Yeah, mail is exactly what I was 
gonna use this with,
> too.  I've got a working script now that uses the 'tr' 
function to switch
> chars around but, this is getting pretty fun. I think I'm 
gonna upgrade to a
> more complex algorithm, next.  Or maybe I'll try 
something like what
> spammimic is using where words become other words and the 
message actually
> looks like something else. 
> 
> Anyway, thanks again for your help.
> 
> -jer
> 
> -----Original Message-----
> From: Mark Thomas [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 12, 2001 21:17
> To: [EMAIL PROTECTED]
> Subject: RE: Text obfuscating
> 
> 
> 
> Jeremiah Fletcher [mailto:[EMAIL PROTECTED]] wrote:
>  
> > I'm mostly just playing around with this but, does 
anyone 
> > know a script (or module) that can transpose a string
> > into some nonsense string and then
> > change it back to the original?  I thought of taking 
each 
> > character in the string and changing it to another
> > character without it being too obvious how
> > it got to that "something else."  This is a sort of
> > simple encryption script.
>  
> Heh. This question amuses me because I had just read 
about an interesting
> site ( www.spammimic.com <http://www.spammimic.com> ) 
that encodes text into
> spam (really!) and decodes it too.
>  
> It is both amazing and hilarious. On the train home 
today, I wrote a module
> that interfaces with the site. Sample usage:
> 
> -------------------
>   #perl -w
>   use Spamcode;
>  
>   $text = Spamcode::encode('hello');
>   print $text;
>   print "\n\n";
>  
>   $response = Spamcode::decode($text);
>   print "$response\n";
> -------------------
>  
> Here's the module:
>  
> -------------------
> #!/usr/local/bin/perl -w
> # spamplify.pl
> # Obfuscate/Deobfuscate short phrases, using spammimic.com
> package Spamcode;
> use strict;
> use LWP::UserAgent;     # for grabbing web pages
> use HTML::TokeParser; # for easy HTML parsing
> sub encode ($) {
>  my $input = shift;
>  $input =~ s/([^a-zA-Z0-9_.-])/uc sprintf("%%%02x",ord
($1))/eg;
>  my $ua = new LWP::UserAgent;
>  my $req = new HTTP::Request
('POST','http://www.spammimic.com/encode.cgi');
>  $req->content_type('application/x-www-form-urlencoded');
>  $req->content("submit=Encode\&plaintext=$input");
>         my $res = $ua->request($req);
>  die "Failed to access encode page" unless ($res-
>is_success);
>  my $page = $res->content;
>         my $parser = HTML::TokeParser->new(\$page);
>  my $output;
>  while (my $token=$parser->get_tag("textarea")){
>                 $output = $parser->get_trimmed_text
("/textarea") if
> ($token->[1]{name}=~/cyphertext/i);
>  }
>  return $output;
> }
> sub decode ($) {
>  my $input = shift;
>  $input =~ s/([^a-zA-Z0-9_.-])/uc sprintf("%%%02x",ord
($1))/eg;
>  my $ua = new LWP::UserAgent;
>  my $req = new HTTP::Request
('POST','http://www.spammimic.com/decode.cgi');
>  $req->content_type('application/x-www-form-urlencoded');
>  $req->content("submit=Decode\&cyphertext=$input");
>  my $res = $ua->request($req);
>  die "Failed to access encode page" unless ($res-
>is_success);
>  my $page = $res->content;
>  my $parser = HTML::TokeParser->new(\$page);
>  my $output;
>  while (my $token=$parser->get_tag("input")){
>                 $output = $token->[1]{value}
>                   if ($token->[1]{name}=~/plaintext/i);
>  }
>  return $output;
> }
> 1;
> __END__
>  
> --
> Mark Thomas
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
> 
> 
> 

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to