Results 11 to 11 of 11
yeah i read what you said and i was bored so i wrote a shabby rot13 encryptor! hope you chaps like it . took me a while (im emmbarrased to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-11-2003 #11Just Joined!
- Join Date
- Sep 2003
- Location
- ../
- Posts
- 62
hey guys!!! i did it!!
yeah i read what you said and i was bored so i wrote a shabby rot13 encryptor! hope you chaps like it . took me a while (im emmbarrased to say exactly how long) but yeah 45 lines of code later here i am with an easy encoder
.
#!/usr/bin/perl -wT
#use strict
sub rot13 {
print "enter the string you want to convert: \n";
foreach ('a'..'m', 'A'..'M') {
$q = chr(ord($_)+13);
@p{($_,$q)} = ($q,$_);
}
while (<>) { s#([a-zA-Z])#$p{$1}#g; print; &MAIN; }
}
sub rot13D {
print "Now enter the string you want to decrypt: \n";
foreach ('a'..'m', 'A'..'M') {
$q = chr(ord($_)+13);
@p{($_,$q)} = ($q,$_);
}
while (<>) { s#([a-zA-Z])#$p{$1}#g; print; &MAIN; }
}
sub MAIN {
print "\n\n\n\n\n\n\n hey how are you doing? this is my rot13 project !
i didnt write the rot13 algorithm so dont give me credit but i did put it
together this little application to write stuff and en/de crypt it
have fun\n";
print " what would you \nlike to do ? \n 1. encrypt file 2.decrypt file 3.quit \n";
$input = <STDIN>;
if ($input == '1')
{
print "ok off we go to encrypt \n";
print "what is the file that you would like to encrypt? type in the name here!\n";
&rot13;
}
elsif ($input == '2')
{
print "alright then type in the name of the file and lets get crackin! \n";
&rot13D;
}
else {
print "arlight ill die! \n";
die;
}
}
&MAIN;
###########eof#############
tell me if it works for you guys
its simple but its a start ; and you said you didnt have any ideas
hahaha


Reply With Quote
