4 *abc
*|
*bcd
*|
*cde
*|
*def
*|
*efg
*|
*fgh
*|
*pqr
*|
*qrs
*|
*rst
*\
5 |
*stu
*|
*tuv
*|
*uvw
*|
*vwx
*|
*wxy
*|
*xyz
*) ;;
8 first
=$
(echo $1 |
sed '/\(.\)\1/{s/.*\(.\)\1.*/\1/;q}; Q1') ||
return 1
9 echo $1 |
sed -n "/\([^$first]\)\1/q; q1"
23 next
=$
(echo $1 |
sed 's/z$/0/; s/y$/z/; s/x$/y/; s/w$/x/; s/v$/w/;
24 s/u$/v/; s/t$/u/; s/s$/t/; s/r$/s/; s/q$/r/;
25 s/p$/q/; s/[no]$/p/; s/m$/n/; s/[kl]$/m/;
26 s/j$/k/; s/[hi]$/j/; s/g$/h/; s/f$/g/; s/e$/f/;
27 s/d$/e/; s/c$/d/; s/b$/c/; s/a$/b/; s/0/0a/')
28 while case $next in *0*) : ;; *) false
;; esac; do
29 next
=$
(echo $next |
sed 's/z0/1/; s/y0/z/; s/x0/y/; s/w0/x/; s/v0/w/;
30 s/u0/v/; s/t0/u/; s/s0/t/; s/r0/s/; s/q0/r/;
31 s/p0/q/; s/n0/p/; s/m0/n/; s/k0/m/;
32 s/j0/k/; s/h0/j/; s/g0/h/; s/f0/g/; s/e0/f/;
33 s/d0/e/; s/c0/d/; s/b0/c/; s/a0/b/; s/1/0a/')
37 a
=$
(printf '%0*d' ${#arg} 0 |
tr 0 a
)
39 echo "searching for password after $arg"
40 while ! valid
$arg; do
44 (( $tries % 1000 )) ||
echo "trying $next"
46 echo "found $next after $tries tries"