#!/usr/bin/perl open(FILE, "Z:\\test\\ftp\\dlclient\\NEFTPClient-1.6.exe"); # Read every line in the file my $filestring; binmode(FILE); binmode(STDOUT); while () { $filestring .= $_; } close FILE; my @encoded = split //, $filestring; # Our decode string #my @decode = (67,111,112,121,114,105,103,104,116,32,169,32,50,48,48,50,32,65,99,116,105,118,101,83,116,97,116,101,32,84,111,111,108,32,67,111,114,112,46); #my $key = 'Copyright © 2000 ActiveState Tool Corp.'; my $key = 'Copyright © ActiveState Corp 2001-2002.'; #my $key = 'Copyright © 2002 ActiveState Tool Corp.'; #my $key = 'Copyright (C) 2002 NewsEdge Corp'; #my $key = ' '; my @keystring = split //, $key; foreach my $num (@keystring) { push @decode, ord($num); } print "@decode\n\n@encodedstring\n"; # Our unecoded string my @unencoded; for my $char (@encoded){ # XOR the encoded string with the decode character push @unencoded, ($char ^ $decode[0]); # Rotate the decode string push @decode, shift @decode; } for my $char (@unencoded){ if ($char == 10){ # Print a newline if the charater is 10 print "\n"; } else { # Print out the unencoded string #print chr($char); print chr($char); } }