home *** CD-ROM | disk | FTP | other *** search
INI File | 1997-02-27 | 14.8 KB | 573 lines |
- ###
- # John the Ripper -- Configuration File
- ###
- # Comments should start with '#' or ';'
- ###
-
- [Defaults]
- # You can uncomment any of the following lines to specify defaults:
- ;Wordfile = Your_Favorite_Wordlist_Filename
- ;Timeout = Timeout_Value_In_Minutes
- ;Beep = Yeah
-
- [Options]
- # Show elapsed time as D:HH:MM:SS instead of just seconds (as Jack does)
- Realtime = Yeah
- # Show the progress indicator
- Percent = Yeah
-
- [Incremental:All]
- CharCount = 95
- MinLen = 1
- MaxLen = 8
-
- File = all.chr
-
- Charset11 = *1a_jyfioqx5$dehmnrJM %&sltcupbgk203w94v678SzBCARPTDHLEGFNKWOIVY!.ZUQ-#X@;?/'^(),:[]"+<=`|>\{}~
-
- Charset21 = 0apmdbjcgerty2nskfu1ilwx5hovBJM9;qS67"348zCARPTDHLEGFNKWOIVY!.ZU_Q-*$#%X@ &?/'^(),:[]+<=`|>\{}~
- Charset22 = 0o2l34astbegrk156jwdhnvcmp78fiu9_qxyzBDFM$')-?SCARPTHJLEGNKWOIVY!.ZUQ*#%X@ ;&/^(,:[]"+<=`|>\{}~
-
- Charset31 = adcprjmstblnkzfghewq9x1voyi5u3726480PRTBCGSADJKLMFNOEIQU !$HWVY.Z_-*#%X@;&?/'^(),:[]"+<=`|>\{}~
- Charset32 = aoesiucmrt2dgbplfjnwhv97xyk35614z8q0APELRCNOSZBDGHJKMTUVW *-./FIY!_Q$#%X@;&?'^(),:[]"+<=`|>\{}~
- Charset33 = mscndtaegpxbhwyrlj3iuzk97ofv2654q810PTADGCKMBFLNSXEIOVYZ $/RHJW!.U_Q-*#%@;&?'^(),:[]"+<=`|>\{}~
-
- Charset41 = 1b2mtdslajcrpk346g0f57nhi89weovzyuJBxRSqMACFTLDIKPW-GHNUY!$._EOVZQ*#%X@ ;&?/'^(),:[]"+<=`|>\{}~
- Charset42 = oaieu219r0543l76n8hmctydsbpkqvwfgjxzOAU-CDEIMPT$.@SBRHJLGFNKWVY!Z_Q*#%X ;&?/'^(),:[]"+<=`|>\{}~
- Charset43 = nar2sle501co34i6md78t9kubgpvhyzfwjxqRSCG-.AEJMNO#$BPTDHLFKWIVY!ZU_Q*%X@ ;&?/'^(),:[]"+<=`|>\{}~
- Charset44 = eao14n2sy305t7ki69ld8hpfrgmcbuxzwvjS!q.I*-ACEGKORT$MBPDHJLFNWVYZU_Q#%X@ ;&?/'^(),:[]"+<=`|>\{}~
-
- Charset51 = smbc1dtparljghfekwnSoBMT32C9DA5ivLJ0RP4G7H6W8zEKNVyuFqZ!IxOQYUX_ .-*$#%@;&?/'^(),:[]"+<=`|>\{}~
- Charset52 = aoeiur2lhtn1pm0scy43b9wd856k7gz@jxfvAUqHOECFILNR_SW '-MBPTDJGKVY!.ZQ*$#%X;&?/^(),:[]"+<=`|>\{}~
- Charset53 = nrailseotmc3gudbpv1k28504y7z69fhxw#jRANVIOUqMZ.CEGHLPST BDJFKWY!_Q-*$%X@;&?/'^(),:[]"+<=`|>\{}~
- Charset54 = eianltrodsck4mbg1uhp729563fv0y8zjw$.xIAN_BCERqFOYZGSTU MPDHJLKWV!Q-*#%X@;&?/'^(),:[]"+<=`|>\{}~
- Charset55 = yesanro5t1lh2ikd0c63mg49p78bfxzuj%wvEYASDNO!qKLT*FRXZ_CIJP #$'+-?]|MBHGWV.UQ@;&/^(),:["<=`>\{}~
-
- Charset61 = smSacbpdtBrj1MhCAlgfTHRDPJkwn0eKGFLWNoiEv263895zV4yuOqIYQZ7xUX!_#* $,-.%@;&?/'^():[]"+<=`|>\{}~
- Charset62 = aoeiurhln2ptmbcs1wy0k395d47v6gAfjE8OxqzIURHBLMN-SWCPKTGQY$'DVXZ !_JF.*#%@;&?/^(),:[]"+<=`|>\{}~
- Charset63 = rnaolsciemtgudpb31yh2wvk0fz4975x6jNRAC8TLMOIGBSqDEUWZPFHKX_VY-Q #$,@[J!.*%;&?/'^():]"+<=`|>\{}~
- Charset64 = einltradskomgcbphv1u4f2w359z0y768jxIEDNRqLMTKASGBCVOHPFJU/Z-QWXY $@_!.*#%;&?'^(),:[]"+<=`|>\{}~
- Charset65 = eiaonrltscu2dykh5m7g1p9w04b36fEzv8.IAOjxL_RTUqNHKGBCMSDYPJV$FQXZ #W!-*%@;&?/'^(),:[]"+<=`|>\{}~
- Charset66 = rensyatd1l0o3hg6mi25wck89pb7u4fxzY!jRESNvALDTqMWKGH.B*O$?JFCPV%;Z#IQX&-_U '@`/^(),:[]"+<=|>\{}~
-
- Charset71 = scmpSbMtCadrfnPBgjhlFAkTRwJDeGHLWvKoNiV0O39E148257yIzqu6ZQYUx_@X!$&'(*.[^-#% ;?/),:]"+<=`|>\{}~
- Charset72 = aeoiruhlnctspm2bwydk3v6fgx415j7A89EOR0IqzLTUHNCWBDKPQSY#JMXZ'.GFV!_-*$%@ ;&?/^(),:[]"+<=`|>\{}~
- Charset73 = arnielocstumdwbgphyfvk342x75z918-6AqjERN0LIMOCSTDGUB$.HPQVWY_JFK!Z*#%X@ ;&?/'^(),:[]"+<=`|>\{}~
- Charset74 = tnreialsdchpmbokgufvwy14352z907j68qxDRNTSECGVLAMPIKW-BJOHY_%FQZ./;!U*$#X@ &?'^(),:[]"+<=`|>\{}~
- Charset75 = ieaotlnsrhmdcukgbp1yf32v5w0946z78AjqOIETxSLRDHNUBGKCJMP ^_QV-.FWY!Z*$#%X@;&?/'(),:[]"+<=`|>\{}~
- Charset76 = enriaoltscudygh91m20k36f4w57pb.8vzERjNAOT_ICDxLPMSUBY&qFHJQV!-GKWZ*$#%X@ ;?/'^(),:[]"+<=`|>\{}~
- Charset77 = senryatlgd1okm2hc63758u0wx9if4pb!zSjEvRNAYT*DL.GKCJO_BHMW$#?qFPVZ%/IQX&')=U-@ ;^(,:[]"+<`|>\{}~
-
- Charset81 = scmpbadtfr1jwgilShek9nCMvBPIoDAT5FGRW02EJ6uyKHLVNz7q48O3xYZ_!Q(*X$;U/@.-#% &?'^),:[]"+<=`|>\{}~
- Charset82 = aioerhulntc0smp92wbd8kv3fy1gj7x64q5zAR_O@MT*EILSCFHNPUY&().BDJGKWV!ZQ-$#%X ;?/'^,:[]"+<=`|>\{}~
- Charset83 = arnmetolicsupdbgh10v3yfkw6485729jzx-_qA#CDMRNPELST )FHIKOUYZ(*.^BJGWV!Q$%X@;&?/',:[]"+<=`|>\{}~
- Charset84 = ertnailshocdpmgkubf4vwy207965813zxjqA$BCHN-_DITLMOPZ GKRX!#%&*.^SJEFWVYUQ@;?/'(),:[]"+<=`|>\{}~
- Charset85 = eroailtnshbcudmgkfpw15y207638v94jz_xqA%IKODLN -;RST*./BFPGHQUVWY$&')<@MCJE!Z#X?^(,:[]"+=`|>\{}~
- Charset86 = nieaortlsmhcudgbp6fvw3y91k028574jzqxDI^LEJ _MSTUW-AGHKOBFNRZ!#$)*,:CPVY.Q%X@;&?/'([]"+<=`|>\{}~
- Charset87 = eaniroltsc1du279mhgk3b46805pyfwv.zjx_R&qALEINOCDMY$*GPSTU-:BHJFKWV!ZQ#%X@ ;?/'^(),[]"+<=`|>\{}~
- Charset88 = ensrtadlo9y1igk8c2hm6530u47pfbwvzjx!*.;S_ENRA-IKLT#&(,q$?CDMPXYZ %']BHJGFWOVUQ@/^):["+<=`|>\{}~
-
- [Incremental:Digits]
- CharCount = 10
- MinLen = 1
- MaxLen = 8
-
- File = digits.chr
-
- Charset11 = 1520349768
-
- Charset21 = 0215967348
- Charset22 = 0234615897
-
- Charset31 = 1325704698
- Charset32 = 2537046189
- Charset33 = 3798614520
-
- Charset41 = 1234605789
- Charset42 = 2190543768
- Charset43 = 2051346879
- Charset44 = 4025317698
-
- Charset51 = 1329504768
- Charset52 = 2104395867
- Charset53 = 3125047968
- Charset54 = 4725163809
- Charset55 = 5013624789
-
- Charset61 = 1026839547
- Charset62 = 2109534768
- Charset63 = 1320497568
- Charset64 = 4125390786
- Charset65 = 5721904368
- Charset66 = 0653218947
-
- Charset71 = 0398457216
- Charset72 = 2364157890
- Charset73 = 3427598160
- Charset74 = 4352190768
- Charset75 = 3152946708
- Charset76 = 4619203578
- Charset77 = 6708295341
-
- Charset81 = 1950268473
- Charset82 = 0928371645
- Charset83 = 1036485729
- Charset84 = 4027698531
- Charset85 = 5120763849
- Charset86 = 6398501274
- Charset87 = 7214963805
- Charset88 = 9806457123
-
- [Incremental:Alpha]
- CharCount = 26
- MinLen = 1
- MaxLen = 8
-
- File = alpha.chr
-
- Charset11 = ajyfioqxdehmnrstlcupbgkwvz
-
- Charset21 = mdjpagetbrnsckyfilwhuoqvzx
- Charset22 = olstabegrkjdhnvwcmpfiquxyz
-
- Charset31 = dacjmbrtpslknfeghowqvzxiuy
- Charset32 = aoeisumctgdblrfjpnvhwkxyzq
- Charset33 = msnctdxepghlywabrjikuzofvq
-
- Charset41 = bmtdslajrcpkfgnhweiozvyuxq
- Charset42 = oaieurlhnmyscpbdtkqwvfgzxj
- Charset43 = narsleoicmdtkubgpvhyzwfjxq
- Charset44 = eaosnytikldhpfrmgcbuxzwvjq
-
- Charset51 = smbcptadrjlghfkenwovizyqux
- Charset52 = aoeiurlhntpmcsybwdkgzfjxvq
- Charset53 = nralioestmudgcpvbkyzfhxwjq
- Charset54 = eianltrodsckmughbpfvyzjwxq
- Charset55 = yesanortlhkdicmgpxbfuzjwvq
-
- Charset61 = smbcpadtrjhgflkwneoivzquyx
- Charset62 = aoeiurhlntmpscwybkdgvfxjzq
- Charset63 = rnaolseicmtgudpbyhwvkfzxjq
- Charset64 = ineltarsdomgkcbhpvufwyzxjq
- Charset65 = eiaonrltsuckdmhwgypbfzvxjq
- Charset66 = ernysatdlohigmwkcpbuxfzjvq
-
- Charset71 = scmpbatfdnrgjhlkwevoiyzuqx
- Charset72 = aeoiruhlnctsmpbwdykgfvxjqz
- Charset73 = arneilcostuwmdbgphyfvkxzjq
- Charset74 = trenialschpmdogbukfwvyzjqx
- Charset75 = iaeotlsnrhdmuckbpgfyvwzjqx
- Charset76 = enoiralstcudghmkypfbvwzjxq
- Charset77 = ensryatldgomkhciuxwpfbzjvq
-
- Charset81 = scmpbtadfrgwjliheknvouyzqx
- Charset82 = aoeirhulntcmspbwdvgkfyjxqz
- Charset83 = arnetoilcsmupdbghvfywkjxzq
- Charset84 = erntialsochdpmgukfbvwyzxjq
- Charset85 = erliatnsohbcumdgkfpwyvzjqx
- Charset86 = iaenortlsmhcudgbpfvwykjzqx
- Charset87 = eaniroltscudhmgbkpfwvyzjxq
- Charset88 = ensrtaldoyigkcmhupfwbvxzjq
-
- [Incremental:Capital]
- CharCount = 26
- MinLen = 3
- MaxLen = 8
-
- Charset31 = TBRSKPACDJLMEFGNHWVIOZYQUX
- Charset32 = aoeiruschlmwntdygkpbfvzxjq
- Charset33 = nmegybilopacdfjkrtuxzshwvq
-
- Charset41 = JBRSAMCFTDKILPWGNYHEVOZQUX
- Charset42 = aoiuertdlvfhnpwscymgkbzxjq
- Charset43 = nsareluchotvimpxzbdfkygwjq
- Charset44 = edaglnyktfhizmsxboprcuwvjq
-
- Charset51 = SBMTCADJLPRGHEKWNVFZIOQYUX
- Charset52 = aoieurhlnmytpwsbcdkxzfgvjq
- Charset53 = nrisatlmoebcgpvkduzywxfhjq
- Charset54 = einlrdaotbsmkcguhpvzfyjwxq
- Charset55 = ysaeronilthdkgmcbfpzxjwuqv
-
- Charset61 = SBMCATHRPDJGFKLNWEVOYIQZUX
- Charset62 = aoeiurlhnpmctswkydbvgfqxjz
- Charset63 = ranolcsietmgdupbhywkvfzxjq
- Charset64 = ltenirdksamogpbvchfuwzyjxq
- Charset65 = eioantrlscudkmhpygfbvzjwxq
- Charset66 = rsyentaldohgwmickpbzfuxqjv
-
- Charset71 = SMCPBFATRJDHGWLKNVOEIZQYUX
- Charset72 = aoeiruhlntcpmwsybvkdxfgjzq
- Charset73 = arnilecostdmubwgphykfvzxqj
- Charset74 = tndsrelacihbkpmgofwuvyzjqx
- Charset75 = ieaotlnhsrkmdcubgpfywvzjqx
- Charset76 = enriaocltsgdyuhmfwkpvzbjqx
- Charset77 = srenyagltdkomhcwfuxpibjzvq
-
- Charset81 = SCMBPIADTFGWREKHJLVNOYZQXU
- Charset82 = aoeirhnultcsmpdxvwyjkqbfzg
- Charset83 = ratnoeliscmgpubdvhyfwkzjqx
- Charset84 = etrasnilhcodmpgkbfuvwyxzqj
- Charset85 = reiathnslobdukpwmgcfyvjxzq
- Charset86 = eiatnolrmshbudgcwfpvykjzqx
- Charset87 = eaorilntcsdugmhbkvpfywxjzq
- Charset88 = entsrdaloyikhgmcupfbxzvjwq
-
- [List.Rules:Single]
- ###
- # Single crack mode rules, extended Crack syntax
- ###
- # Simple rules come first...
- :[:cl]
- # These were not included in crackers I've seen, but are pretty efficient
- # so I include them near the beginning
- >6x06
- >7lx07
- >6/?ulx06
- >5x05
- # Weird order, eh? Can't do anything about it, the order is based on the
- # number of successful cracks...
- d
- :[rd]c
- >5/?ulx05
- u
- lr
- <8[lc]p
- cd
- >7/?ux07
- >4lx04
- <9cr
- <9rcr
- >3x03
- >4/?ux04
- >3/?ulx03
- ur
- lf
- # About 50% of single-mode-crackable passwords get cracked by now...
- >2x12
- >3x13
- >4x14
- >5x15
- >6x16
- >7x17
- >8x18
- >3x22
- >4x23
- >5x24
- >6x25
- >7x26
- >8x27
- >9x28
- >4x32
- >5x33
- >6x34
- >7x35
- >8x36
- >9x37
- >2/?ulx12
- >3/?ulx13
- >4/?ulx14
- >5/?ulx15
- >6/?ulx16
- >7/?ulx17
- >8/?ulx18
- >3/?ulx22
- >4/?ulx23
- >5/?ulx24
- >6/?ulx25
- >7/?ulx26
- >8/?ulx27
- >9/?ulx28
- >4/?ulx32
- >5/?ulx33
- >6/?ulx34
- >7/?ulx35
- >8/?ulx36
- >9/?ulx37
- # Now to the suffix stuff...
- <8[lc]$[1-9!0a-z"-/:-@\[-`{-~]
- <8lr$[1-9!]
- <8u$[1-9!]
- <7[lc]$!$!
- <6[lc]$!$!$!
- # Removing vowels...
- /?v@?v>2[lcd]
- # crack -> cracked, crack -> cracking
- <8l[PG][:c]
- # mary -> marie
- :[lc]r=0yo0ir$e
- # marie -> mary
- :[lc]r=0e=1iD0o0yr
- # The following 3l33t rules are based on original Crack's dicts.rules
- l/asa4[:c]
- l/ese3[:c]
- l/lsl1[:c]
- l/oso0[:c]
- l/sss$[:c]
- l/asa4/ese3[:c]
- l/asa4/lsl1[:c]
- l/asa4/oso0[:c]
- l/asa4/sss$[:c]
- l/ese3/lsl1[:c]
- l/ese3/oso0[:c]
- l/ese3/sss$[:c]
- l/lsl1/oso0[:c]
- l/lsl1/sss$[:c]
- l/oso0/sss$[:c]
- l/asa4/ese3/lsl1[:c]
- l/asa4/ese3/oso0[:c]
- l/asa4/ese3/sss$[:c]
- l/asa4/lsl1/oso0[:c]
- l/asa4/lsl1/sss$[:c]
- l/asa4/oso0/sss$[:c]
- l/ese3/lsl1/oso0[:c]
- l/ese3/lsl1/sss$[:c]
- l/ese3/oso0/sss$[:c]
- l/lsl1/oso0/sss$[:c]
- l/asa4/ese3/lsl1/oso0[:c]
- l/asa4/ese3/lsl1/sss$[:c]
- l/asa4/ese3/oso0/sss$[:c]
- l/asa4/lsl1/oso0/sss$[:c]
- l/ese3/lsl1/oso0/sss$[:c]
- l/asa4/ese3/lsl1/oso0/sss$[:c]
- # Now to the prefix stuff...
- l^[1a-z2-90A-Z"-/:-@\[-`{-~]
- <9[lc]^e^h^[tT]
- <9[lc]^y^m^[aA]
- <9[lc]^r^[mdMD]
- <9[lc]^.^r^[mdMD]
- <9[lc]^_^_
- <7lp^2
- # Some word pair rules...
- # johnsmith -> JohnSmith, johnSmith
- =0?a2=0?ac1[cl]
- # JohnSmith -> john smith, john_smith, john-smith
- 1<7$[ _\-]+l
- # JohnSmith -> John smith, John_smith, John-smith
- 1<7=0?ac$[ _\-]2l
- # JohnSmith -> john Smith, john_Smith, john-Smith
- 1<7l$[ _\-]2=0?ac
- # johnsmith -> John Smith, John_Smith, John-Smith
- 1<7=0?ac$[ _\-]2=0?ac
- # Applying different simple rules to each of the two words
- 1[ur]2l
- 2=0?ac1[ur]
- 1l2[ur]
- 1=0?ac2[ur]
- # jsmith -> smithj, etc...
- :[lc][{}]
- :[lc]}}
- :[lc]{{
- # Deleting chars...
- D[1-7][:lc]
- # Inserting a dot...
- >3[lc]i[12].
- # More suffix stuff...
- <7[lc]$[19]$[0-9]
- <7[lc]$6$9
- <7[lc]$[72]$[0-9]
- <8[lc]$[A-Z]
- # cracking -> CRACKiNG
- u/IsIi
- # Crack96 -> cRACK96
- :[:c]~I
- # Crack96 -> cRACK(^
- ~i
- # Crack96 -> CRaCK96
- /?v~v
- # Really weird charset conversions, like "england" -> "rmh;smf" (one of
- # the real passwords I cracked; check your keyboard)
- ~[><]
- :[lc]~[><]
- ~>~>
- ~<~<
- # Both prefixing and suffixing...
- <7l^1$1
- <7l^!$!
- <7l^@$@
- <7l^#$#
- <7l^$$$
- <7l^%$%
- <7l^^$^
- <7l^&$&
- <7l^*$*
- <7l^($)
- <7l^-$-
- <7l^=$=
- <7l^_$_
- <7l^+$+
- <7l^.$.
- <7l^?$?
- <7l^{$}
- <7l^\[$]
- <7l^<$>
- <7l^|$|
- <7l^:$:
- <7l^'$'
- <7l^"$"
- # The rest of two-digit suffix stuff, rare numbers...
- <7[lc]$6$[0-8]
- <7[lc]$[3-580]$[0-9]
- # Some three-digit numbers...
- <6[lc]$0$0$7
- <6[lc]$1$1$1
- <6[lc]$1$2$3
- <6[lc]$2$2$2
- <6[lc]$3$3$3
- <6[lc]$4$4$4
- <6[lc]$5$5$5
- <6[lc]$6$6$6
- <6[lc]$7$7$7
- <6[lc]$8$8$8
- <6[lc]$9$9$9
- # Some [birth] years...
- <6>4l$1$9$[7-90-6]
- <5l$1$9$[7-90-6]$[0-9]
- # Uncomment the following lines if you're really crazy
- ;# Insert/overstrike some characters...
- ;!?Ali[1-6][a-z]
- ;!?Alo[0-7][a-z]
- ;# Very slow stuff...
- ;<6[lc]$[1-90]$[0-9]$[0-9]
- ;<7l$[a-z]$[a-z]
- ;<9l^[a-z]^[a-z]
- ;<7l^[a-z]$[a-z]
-
- [List.Rules:Wordlist]
- ###
- # Wordlist mode rules (use -rules to enable)
- ###
- # Try words as they are
- :
- # Lowercase every pure alphanumeric word
- !?Xl
- # Capitalize every pure alphanumeric word
- !?Xc
- # Lowercase and pluralize pure alphabetic words of reasonable length
- <8>2!?Alp
- # Lowercase and reverse pure alphabetic words
- !?Alr
- # Uppercase pure alphanumeric words
- !?Xu
- # Words with vowels removed, lowercase
- /?v@?v>3l
- # Lowercase pure alphabetic words and append a digit or simple punctuation
- <8!?Al$[1-9!.?0]
- # Words containing whitespace, which is then squeezed out, lowercase
- /?w@?w>3l
- # Words containing punctuation, which is then squeezed out, lowercase
- /?p@?p>3l
- # Duplicate reasonably short pure alphabetic words (fred -> fredfred)
- <7!?Ald
- # Capitalize and duplicate short pure alphabetic words (fred -> FredFred)
- <7!?Acd
- # Capitalize and reverse pure alphabetic words (fred -> derF)
- <9!?Acr
- # Reverse and capitalize pure alphabetic words (fred -> Derf)
- !?Arc
- # Lowercase and reflect pure alphabetic words (fred -> fredderf)
- <7!?Alf
- # Uppercase the last letter of pure alphabetic words (fred -> freD)
- <9!?Arcr
- # Prefix pure alphabetic words with digits
- !?Al^[1-9]
- # Capitalize pure alphabetic words and append a digit or simple punctuation
- <8!?Ac$[1-9!.?0]
- # Capitalize and pluralize pure alphabetic words of reasonable length
- <8>2!?Acp
- # Lowercase/capitalize pure alphabetic words of reasonable length and convert:
- # crack -> cracked, crack -> cracking
- <8>2!?A[lc][PG]
-
- ###
- # Some pre-defined filters for use with other modes
- ###
- [List.External:Filter_Alpha]
- void filter() {
- int i;
-
- i = 0;
- while (word[i] && word[i] >= 'a' && word[i] <= 'z') i++;
- if (word[i]) word = 0;
- }
-
- [List.External:Filter_Digits]
- void filter() {
- int i;
-
- i = 0;
- while (word[i] && word[i] >= '0' && word[i] <= '9') i++;
- if (word[i]) word = 0;
- }
-
- [List.External:Filter_Capital]
- void filter() {
- int i;
-
- if (word < 'A' || word > 'Z') word = 0; else {
- i = 1;
- while (word[i] && word[i] >= 'a' && word[i] <= 'z') i++;
- if (word[i] || i < 3) word = 0;
- }
- }
-
- [List.External:Example]
- ###
- # The following code is an example of defining an external cracking mode
- ###
- # global variables:
- int isvowel[256], len, current[9];
-
- # init() is called at startup (not required)
- void init() {
- int i, c;
-
- i = 256;
- while (i--) {
- c = i | 0x20;
- isvowel[i] = c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u';
- }
-
- current[i = len = 5] = 0;
- while (i--) current[i] = 'a';
- }
-
- # filter() is called for each word, even when not using an external word
- # generator, so you can filter some words out
- void filter() {
- int i, c, v;
-
- i = c = v = 0;
- while (word[i]) {
- if (isvowel[word[i++]]) {
- v++; c = 0;
- } else {
- c++; v = 0;
- }
- if (v > 1 || c > 2) word = 0;
- }
- }
-
- # generate() is the word generation routine, and is only called when no
- # other cracking modes used (if you use an external mode with some other
- # mode, only init() and filter() are used)
- void generate() {
- int i;
-
- i = len + 1;
- while (i--) word[i] = current[i];
-
- i = len - 1;
- while (++current[i] > 'z')
- if (i) current[i--] = 'a'; else current = -1;
- }
-
- # restore() is called when restoring an interrupted external mode session;
- # it should set global variables to continue from the supplied word
- void restore() {
- int i;
-
- i = len + 1;
- while (i--) current[i] = word[i];
- }
-