With much hard work I have come up with a new package...
Crypt::1337, I feel it is my duty to give back to the community and what better than a new form of encryption only idiots could use? Now, keep in mind this is an alpha version, and does lose a bit of formatting... but returns messages in readble format...
package Crypt::1337;
use base Exporter;
@EXPORT = qw(to_1337 from_leet);
sub to_1337 {
my($str) = lc $_[0];
$str =~ s/\bto\b/2/g;
$str =~ s/ate/8/g;
$str =~ tr/letasbgo/13745690/;
$str;
};
sub from_leet {
@str = split /(\s+)/, lc $_[0];
for (@str) {
next if /\s/;
$_ = 'to' if $_ == 2;
$_ = 'a' if $_ == 4;
next if(/^\d+$/ && $_ !~ /3?1337/);
s/8/ate/g;
s/8/to/g;
tr/13745690/letasbgo/;
}
join '', @str;
}
and for an example script....
use Crypt::1337;
my $enc = to_1337("This is a test, later\n");
print $enc;
my $unenc = from_leet($enc);
print $unenc;
Enjoy your 1337 h4ckin9.
This is, of course, a joke... :)
- Ant
- Some of my best work - Fish Dinner