Tuesday, 2 January 2007

Making Your Own Cryption in Perl(very easy)

#!perl
#this programm will replace any character from a-z with the next following.
print "Crypt:";
chomp($crypt=);
my $cr = $crypt;
my $length = length($cr);
for(my $i=0; $i<$length; $i++) {
$ok=substr($cr,$i,1);
&crypt($ok);
}


sub crypt() {
$crypt=shift;
#the next part is gonna be VERY EXTREMLY EASY there will be NO Regular Expression
#this is just there to show how to make ur own 'cryption' with perl,withOUT using Regular Expression.
#maybe im gonna make another one withIN Regular Expression soon.
if ($crypt eq "a") {
print "b";
}

if ($crypt eq "b") {
print "c";
}

if ($crypt eq "c") {
print "d";
}

if ($crypt eq "d") {
print "e";
}

if ($crypt eq "e") {
print "f";
}

if ($crypt eq "f") {
print "g";
}

if ($crypt eq "h") {
print "i";
}

if ($crypt eq "i") {
print "j";
}

if ($crypt eq "j") {
print "k";
}

if ($crypt eq "k") {
print "l";
}

if ($crypt eq "l") {
print "m";
}

if ($crypt eq "m") {
print "n";
}

if ($crypt eq "n") {
print "o";
}

if ($crypt eq "o") {
print "p";
}

if ($crypt eq "p") {
print "q";
}

if ($crypt eq "q") {
print "r";
}

if ($crypt eq "r") {
print "s";
}

if ($crypt eq "s") {
print "t";
}

if ($crypt eq "t") {
print "u";
}

if ($crypt eq "v") {
print "w";
}

if ($crypt eq "w") {
print "x";
}

if ($crypt eq "x") {
print "y";
}

if ($crypt eq "z") {
print "!";
}
}
#http://tech-bl0od3r.blogspot.com/

No comments: