#!/usr/local/bin/perl # # $Id: dec7.pl,v 1.2 2006/08/31 08:53:58 sjc Exp $ use strict; #my @xlat = ( 0x64, 0x73, 0x66, 0x64, 0x3b, 0x6b, 0x66, 0x6f, 0x41, # 0x2c, 0x2e, 0x69, 0x79, 0x65, 0x77, 0x72, 0x6b, 0x6c, # 0x64, 0x4a, 0x4b, 0x44, 0x48, 0x53 , 0x55, 0x42 ); # xor string is: dsfd;kfoA,.iyewrkldJKDHSUBs my @xlat = (0x64, 0x73, 0x66, 0x64, 0x3b, 0x6b, 0x66, 0x6f, # offset 0 - 7 0x41, 0x2c, 0x2e, 0x69, 0x79, 0x65, 0x77, 0x72, # offset 8 - F 0x6b, 0x6c, 0x64, 0x4a, 0x4b, 0x44, 0x48, 0x53, 0x55, 0x42, # this is the end of the string as published 0x73 # this has been added ); my $pass = $ARGV[0]; die "Usage: $0 \n" if $pass eq ""; $pass = &backpass($pass); # sub to convert var to be usable! print $pass."\n"; sub backpass { my ($backpass) = shift (@_); my ($s, $e) = ($backpass =~ /^(..)(.+)/o); my $dp; for (my $i = 0; $i < length($e); $i+=2) { $dp .= sprintf "%c",hex(substr($e,$i,2))^$xlat[$s++]; } return $dp; }