hashcat Forum
Parsing out hashes from single lines - Printable Version

+- hashcat Forum (https://hashcat.net/forum)
+-- Forum: Misc (https://hashcat.net/forum/forum-15.html)
+--- Forum: General Talk (https://hashcat.net/forum/forum-33.html)
+--- Thread: Parsing out hashes from single lines (/thread-6403.html)



Parsing out hashes from single lines - devilsadvocate - 03-18-2017

Scenario: a sql dump file that contains multiple md5 hashes, but they are all on a single line.  The goal is to parse them out to make them readable by hashcat.

While this command is functional, it runs VERY slow.

cat md5.sql | grep -i -o -w '\w\{32\}' | grep -i -v '[g-z_]' > md5_hashes_unsorted_ununiqed.hash

Is there a faster way to parse out md5 strings from single lines that contain multiple md5 hashes?


RE: Parsing out hashes from single lines - philsmd - 03-18-2017

Code:
egrep -o '[0-9a-fA-F]{32}' md5.sql > md5_hashes_unsorted_ununiqed.hash

or even better and much more correct (because otherwise you could get some false positives):

Code:
SELECT password INTO OUTFILE 'md5_hashes_unsorted_ununiqed.hash' FROM table;