Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ihciah
Created April 28, 2016 10:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ihciah/86860d2d7d3cfb04b0b95d3ffbb86b68 to your computer and use it in GitHub Desktop.
Save ihciah/86860d2d7d3cfb04b0b95d3ffbb86b68 to your computer and use it in GitHub Desktop.
John the Ripper to Hashcat Convertor
#!/usr/bin/python
import re
pat=re.compile(r'NETNTLM:\s{1}(.*?):\$NETNTLM\$(.*?)\$(.*?)$', re.M)
with open('/home/ihciah/hostapd-2.2/hostapd/hostapd-wpe.log') as fo:
lines=fo.read()
user_list={x[0]:x for x in pat.findall(lines)}
with open('mschap.hash','w') as f:
f.write('\n'.join(map(lambda x:x[0]+"::::"+x[2]+":"+x[1],user_list.values())))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment