Permalink
Browse files

Integrate psk-crack (from ike-scan) into john.

  • Loading branch information...
1 parent a0b8994 commit d20ca4e823db5b69a4431291497bdd2dcb7f482f @kholia kholia committed Jul 8, 2012
Showing with 834 additions and 0 deletions.
  1. +25 −0 run/ikescan2john.py
  2. +553 −0 src/ike-crack.h
  3. +254 −0 src/ike_fmt_plug.c
  4. +2 −0 src/unused/ikedump
View
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+
+"""ikescan2john.py processes ike-scan output files into a format suitable
+for use with JtR."""
+
+import sys
+
+
+def usage():
+ print >>sys.stderr, "Usage: %s <psk-parameters-file> [norteluser]" % sys.argv[0]
+ sys.exit(-1)
+
+if __name__ == "__main__":
+ if len(sys.argv) < 2:
+ usage()
+
+ with open(sys.argv[1], "r") as f:
+ for line in f.readlines():
+ line = line.rstrip().replace(':', '*')
+ if len(sys.argv) == 2:
+ print "$ike$*0*%s" % (line)
+ elif len(sys.argv) == 3:
+ print "$ike$*1*%s*%s" % (sys.argv[2], line)
+ else:
+ usage()
Oops, something went wrong.

0 comments on commit d20ca4e

Please sign in to comment.