03-16-2017, 04:45 AM
And here's a rough pass at the reverse:
Code:
#!/usr/bin/env perl
# Credit: undeath, https://hashcat.net/forum/thread-3522.html
# ... and devilsadvocate ;)
use utf8;
while (<>) {
if ($_ =~ m/(.*):\$HEX\[([A-Fa-f0-9]+)\]/) {
print $_;
} else {
if ($_ =~ m/(.*?):(.*)/) {
print $1 . ':$HEX[' . unpack("H*", $2) . ']' . "\n"
}
}
}
~