Potfile format - to hex or not to hex
#5
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"
       }
   }
}
~


Messages In This Thread
RE: Potfile format - to hex or not to hex - by royce - 03-16-2017, 04:45 AM