Interesting use cases, thanks.
Two things, though:
1. Since the subject of this post starts with "Potfile format", I assumed that the end goal is to convert a potfile, but retain the potfile format. The script that I provided takes a potfile as input and produces an un-HEXed potfile, of the standard form hash:plain. Your script converts both the hash and the plaintext of a potfile to hex, including the colon separator.
EDIT - Yikes! I posted the wrong version!
2. To clarify, are you saying that you try the hex-as-a-string form of passwords against hashes? I would expect very few hits from this technique.
Two things, though:
1. Since the subject of this post starts with "Potfile format", I assumed that the end goal is to convert a potfile, but retain the potfile format. The script that I provided takes a potfile as input and produces an un-HEXed potfile, of the standard form hash:plain. Your script converts both the hash and the plaintext of a potfile to hex, including the colon separator.
EDIT - Yikes! I posted the wrong version!
Code:
#!/usr/bin/env perl
# Credit: undeath, https://hashcat.net/forum/thread-3522.html
use utf8;
while (<>) {
if ($_ =~ m/(.*):\$HEX\[([A-Fa-f0-9]+)\]/) {
print $1 . ':' . pack("H*", $2), "\n"
} else {
print $_;
}
}
2. To clarify, are you saying that you try the hex-as-a-string form of passwords against hashes? I would expect very few hits from this technique.
~