##Authored by Troy Osborne (Pseudomander) 4:45am 25/02/2012 EST +10## ##Free to redistribute, use, copy, upload & adapt this work, all I ask is if it in anyway represents the original version please give credit where due## $key=""; @karray= split(//,$key); $offsetpattern=""; $offsetpattern2=""; while (length($key) < 4) { print "Please Enter Your Desired Key (5 or more characters) \n --> :"; $key=<>; } for ($i=0;$i :"; $inp=<>; if (($inp=~/E/) or ($inp=~/e/)) #Encryption { print "Enter Plaintext\n --> :"; $plaintext = <>; $len = length($plaintext)-1; @array = split(//, $plaintext); for ($i=0;$i<$len;$i++) { $char = chr((ord(@array[$i]) - ord($offset[$i % length($key)*length($key)])+ ord($offset2[$i % length($key)]))%256); print chr(ord($char)-($i%6)); } } elsif (($inp=~/D/) or ($inp=~/d/)) #Decryption { $a=""; print "Enter Cyphertext\n --> :"; $cyphertext = <>; $len = length($cyphertext)-1; @array = split(//, $cyphertext); for ($i=0;$i<$len;$i++) { $char = chr((ord(@array[$i]) + ord($offset[$i % length($key)*length($key)]) - ord($offset2[$i % length($key)]))%256); print chr(ord($char)+($i%6)); } } $wait =<>;