-
-
Save xorcat/b025466ffb16826f5a8c8916d60aba39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# credit not to me, but I've lost the original source :( | |
@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 ); | |
chomp ($epass = $ARGV[0]); | |
if (!(length($epass) & 1)) { | |
$ep = $epass; | |
$dpass = ""; | |
($s, $e) = ($ep =~ /^(..)(.+)/); | |
for ($i = 0; $i < length($e); $i+=2){ | |
$dpass .= sprintf "%c",hex(substr($e,$i,2))^$xlat[$s++]; | |
} | |
} | |
print "$dpass\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment