Skip to content

Commit

Permalink
Create export_potfile.py
Browse files Browse the repository at this point in the history
Just a simple script to export the contents of a potfile, and decode the hex encoded passwords
  • Loading branch information
mubix authored Sep 16, 2020
1 parent f2a86c7 commit 31758af
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/export_potfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env python

import sys
import re


for line in sys.stdin:
if ':' in line:
passw = line.split(':')[1].rstrip()
if passw.startswith('$HEX['):
hexpassw = re.search('\$HEX\[([a-zA-Z0-9]+)\]', passw).group(1)
passw = bytearray.fromhex(hexpassw).decode('latin-1')
print(passw)

0 comments on commit 31758af

Please sign in to comment.