File: makechr

package info (click to toggle)
john 1.9.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,504 kB
  • sloc: ansic: 22,788; asm: 5,665; makefile: 899; sh: 518; perl: 158
file content (22 lines) | stat: -rwxr-xr-x 842 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
#
# This is a script to (re-)generate the .chr files using passwords in john.pot
# and applying all of the defined external mode filters.  To speed it up on a
# sufficiently large computer (RAM and CPUs), "&" may be added after the John
# invocation (to run all of them in parallel).
#
# Copyright (c) 2013 by Solar Designer
# Redistribution and use in source and binary forms, with or without
# modification, are permitted.
# There's ABSOLUTELY NO WARRANTY, express or implied.
# (This is a heavily cut-down "BSD license".)
#

# Look for John in the same directory with this script
DIR="`echo "$0" | sed 's,/[^/]*$,,'`"

sed -n 's/^\[List.External:Filter_\([A-Za-z_]\+\)\]$/\1/p' < john.conf |
    while read CHR; do
	CHR_LOWER="`echo -n $CHR | tr A-Z a-z`"
	$DIR/john --make-charset=${CHR_LOWER}.chr --external=Filter_${CHR}
done