awk-fu

Case 1

Format the file to be able to crack the hashes using hashcat. This will concatenate the username with the NTLM hash.

cat ntds-hash | grep ::: | awk -F: '{print $1":"$4}'

grep ::: Keep only the lines that contains the matching pattern

-F : Specify the separator of the column

'{print $1":"$4}' : Print the 1th and 4th column and concatenate the two columns with :

Output

Case 2

Define trailing dot as delimiter and keep only line that have less than 3 fields.

awk -F . 'NF<3' linkedin_names.txt

Last updated