-
Notifications
You must be signed in to change notification settings - Fork 33
/
hat.py
executable file
·1914 lines (1844 loc) · 98.5 KB
/
hat.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/usr/bin/python2.7
'''
#Release Date - 14/10/2019
#Latest update - Pre-Release
#Last Modified - 14/10/2019
#Python Hashcat Automated Password Recovery
#Version 1.0
#Currenty working in python 2.7
#Update to python 3 (to do)
'''
#Module Imports
import csv
import fnmatch
import os
import pprint as pp
import re # Used for regex
import readline
import signal # Used to control Prince
import subprocess
import sys
import time
#Define Colours
def prRed(prt):
print"\033[91m {}\033[00m" .format(prt)
def prGreen(prt):
print"\033[92m {}\033[00m" .format(prt)
def prYellow(prt):
print"\033[93m {}\033[00m" .format(prt)
def prLightPurple(prt):
print"\033[94m {}\033[00m" .format(prt)
def prPurple(prt):
print"\033[95m {}\033[00m" .format(prt)
def prCyan(prt):
print"\033[96m {}\033[00m" .format(prt)
def prLightGray(prt):
print"\033[97m {}\033[00m" .format(prt)
'''
More Colours Reference Table
print('\033[32m' + 'Bright Green' + '\033[0m')
print('\033[31m' + 'Red' + '\033[0m')
print('\033[33m' + 'Yellow' + '\033[0m')
print('\033[34m' + 'Blue' + '\033[0m')
print('\033[35m' + 'Purple' + '\033[0m')
print('\033[44m' + 'Cyan' + '\033[0m')
print('\033[45m' + 'Purple_back-white-text' + '\033[0m')
print('\033[46m' + 'Cyan_back-white-text' + '\033[0m')
print('\033[47m' + 'Grey_back-white-text' + '\033[0m')
print('\033[48m' + 'Black-back_white-text' + '\033[0m')
print('\033[41m' + 'Red-back-White-text' + '\033[0m')
print('\033[42m' + 'Green-back-white-text' + '\033[0m')
print('\033[43m' + 'Yellow-back-White-text' + '\033[0m')
'''
ALL_MENU = False
#Both Values are set to false on program start.
#This is used to trigger the pot file and hash upload functionality.
FILE_HASH_BOOLEAN = False
SINGLE_HASH_BOOLEAN = False
#Used to allow multiple tests via the menu with the same pot file already selected.
#Note Global pot_boolean resides inside the pot_function() function block.
POT_BOOLEAN = False
#Used for supporting the cewl wordlists if standard wordlists are not getting results
CEWL_BOOLEAN = False
#Used to set the wireless menu
WIRELESS_BOOLEAN = False
#Used where we are only interested in User hashes to save time during engagements
USER_ONLY_BOOLEAN = False
#Initally Clear the Screen
os.system('clear')
#AWK command - AWKward command that doesn't sit well when called idrectly.
AWK = " " + "awk '!x[$0]++'" + " "
#HM_ANSWER set to '999' - Used if not declared for the stats menu.
HM_ANSWER = "999"
#Declare Paths
#First make the hat absolute path dynamic and go up one level to accomodate each related path
HASHCAT_PATH = os.getcwd()
#Set the wordlist directory to where you're wordlists are...
WORDLIST_DIRECTORY = "/mnt/storage-2TB/wordlists"
L00T_POT_DIR = os.path.join(HASHCAT_PATH, 'l00t')
RULES_DIR = os.path.join(HASHCAT_PATH, 'rules')
STATS_DIR = os.path.join(HASHCAT_PATH, 'stats')
HASH_UPLOAD_DIR = os.path.join(HASHCAT_PATH, 'hash_upload')
CEWL_UPLOAD_DIR = os.path.join(HASHCAT_PATH, 'cewl_wordlists')
TOOLS_DIR = os.path.join(HASHCAT_PATH, 'tools')
RSMANGLER_UPLOAD_DIR = os.path.join(HASHCAT_PATH, 'rsmangler')
RSMANGLER_INPUT_DIR = os.path.join(RSMANGLER_UPLOAD_DIR, 'input')
RSMANGLER_OUTPUT_DIR = os.path.join(RSMANGLER_UPLOAD_DIR, 'output')
WIRELESS_UPLOAD_DIR = os.path.join(HASHCAT_PATH, 'wireless_upload')
#Define Wireless File Extensions
CAP_FILE_EXT = '.cap'
HCCAPX_FILE_EXT = '.hccapx'
#Banner
def banner():
os.system('clear')
print""
prGreen(" @@@,@&&&&@@@@@@@@@@ ")
prGreen(" @@@@@@&&&&@@@@@@@@@ `7MMF' `7MMF' db MMP''MM''YMM ")
prGreen(" @@@@@&&&&@@@@@@@@@ MM MM ;MM: P' MM `7 ")
prGreen(" @@@@@@&&&&@@@@@@@@ MM MM ,V^MM. MM ")
prGreen(" @@@@@&&&&@@@@@@@@ MMmmmmmmMM ,M `MM MM ")
prGreen(" @@@@@@&&&&@@@@@@@@ MM MM AbmmmqMA MM ")
prGreen(" @@@@@&&&&@@@@@@@@ . MM MM A' VML MM ")
prGreen(" @@@@@&&&&&@@@@@@&&&@@@ .JMML. .JMML..AMA. .AMMA. .JMML. ")
prGreen(" %@@@@@@@@@&&@@@@@&&&@@@@@@ ")
prGreen(" @@@@@@@@@@@@@@@@&&&@@@@@@@ --==The Hashcat Automation Toolset==-- ")
prGreen(" @@@@@@@@@@@@@@&& Created By @__sp00ks__ ")
prGreen(" %@@@@@@@@& https://github.com/sp00ks-git/hat ")
print""
#Pot File - Create a New Potfile when using a single wordlist or the file upload functionality.
def pot_function():
global POT
global POT_BOOLEAN
global HASH_PATH_AND_NAME
global HASH_ABS_PATH
global USER_ONLY_BOOLEAN
if SINGLE_HASH_BOOLEAN:
POT = SINGLE_HASH_FILE_NAME.lower()
HASH_PATH_AND_NAME = os.path.join(os.getcwd(), SINGLE_HASH_FILE_NAME)
elif WIRELESS_BOOLEAN:
POT = WIRELESS_INPUT.lower()
HASH_PATH_AND_NAME = os.path.join(WIRELESS_UPLOAD_DIR, WIRELESS_INPUT)
elif USER_ONLY_BOOLEAN:
POT = HASH_INPUT + '_users'
HASH_PATH_AND_NAME = HASH_ABS_PATH
else:
HASH_PATH_AND_NAME = HASH_ABS_PATH
POT = HASH_INPUT.lower()
POT += '.pot' #No need to create a file here as hashcat will automajically make one
POT_BOOLEAN = True
return
#Hash Mode Selection Menu
def hash_mode_menu():
global HASH_TYPE
global HM_ANSWER
if WIRELESS_BOOLEAN:
HASH_TYPE = '2500' #.hccapx format
return HASH_TYPE
else:
loop = True
while loop:
print"Input Hash Mode To Crack"
prCyan("\t(0) NTLM {AKA NTHASH} - A SAM Database Hash - NTDS.dit - {PTH Possible}")
prGreen("\tNTLM Example - 49a9a1e1f0127c7d70d750349d0bc09a - order (LM-NT)")
prLightPurple("\t(1) Net-NTLMv1 Hash {AKA NTLMv1}")
prGreen("\tNet-NTLMv1 Hash Example - u4-netntlm::kNS:338d08f00000:c23a90751cdd619b6e1e4bf33006ba41:c80860<snip>")
prCyan("\t(2) Net-NTLMv2 Hash {AKA NTLMv2}")
prGreen("\tNet-NTLMv2 Hash Example - admin::N46iSNekpT:08ca45b7d7ea58ee:88dcbe4446168966a153a0064958dc6:3<snip>")
prLightPurple("\t(3) MD5 Unix {Shadow File Format}")
prGreen("\tMD5 Unix Example - $1$28772684$iEwNOgGugqO9.bIz5sk8k/")
prCyan("\t(4) SHA-512 Unix {Shadow File Format}")
prGreen("\tSHA-512 Example - $6$52450745$k5ka2p8bFuSKBcCNqoDKzYiJL9RaE8yMnPgh2XzzF0NDrUhgrcLwg78xs1w5pJiy<snip>")
prLightPurple("\t(5) Kerberos 5 TGS-REP etype 23 - Kerberoasting Format")
prGreen("\tRC4-HMAC-MD5 Example - $krb5tgs$23$*user$realm$test/spn*$b548eb06bae0eead3b7f639178a90cf24d9a1<snip>")
prCyan("\t(6) AS-REP ROASTING - Kerberos 5 AS-REP etype 23")
prGreen("\tAS-REP23 Example - $krb5asrep$23$user@domain.com:3e156ada591263b8aab0965f5aebd837$007493e4r5t7<snip>")
prLightPurple("\t(7) WPA-EAPOL-PBKDF2 (.hccapx - Wireless) ")
prGreen("\tExample - 484350580400000000023538000000000000000000000000000000000000000000000000000000000000<snip> ")
prCyan("\t(8) MS SQL Hash")
prGreen("\tExample - 0x02003788006711b2e74e7d8cb4be96b1d187c96d30d0a5ee65d3ce1970f96e705c595f07622w3e4r1b1<snip>")
prLightPurple("\t(9) Custom Hash Type - ENTER a HASHCAT MODE Number")
prRed("\t(x) Back")
HM_ANSWER = raw_input(": ")
if HM_ANSWER == "0": #NTLM aka NTHASH
HASH_TYPE = '1000'
return (HASH_TYPE)
elif HM_ANSWER == "1": #Net-NTLMv1 aka NTLMv1
HASH_TYPE = '5500'
return (HASH_TYPE)
elif HM_ANSWER == "2": #Net-NTLMv2 aka NTLMv2
HASH_TYPE = '5600'
return (HASH_TYPE)
elif HM_ANSWER == "3": #MD5 (no salt)
HASH_TYPE = '0'
return (HASH_TYPE)
elif HM_ANSWER == "4": #SHA-512 Unix
HASH_TYPE = '1800'
return (HASH_TYPE)
elif HM_ANSWER == "5": #Kerberos 5 TGS-REP etype 23 --> RC4-HMAC-MD5
HASH_TYPE = '13100'
return (HASH_TYPE)
elif HM_ANSWER == "6": #Kerberos 5 AS-REP etype 23 (AS-REP ROASTING)
HASH_TYPE = '18200'
return (HASH_TYPE)
elif HM_ANSWER == "7": #WPA-EAPOL-PBKDF2 (.hccapx - Wireless)
HASH_TYPE = '2500'
return (HASH_TYPE)
elif HM_ANSWER == "8": #MS-SQL
HASH_TYPE = '1300'
return (HASH_TYPE)
elif HM_ANSWER == "9": #Custom Hash Type
HASH_TYPE = raw_input('If you know it, enter the Hashcat mode number to use or type' + ' ' + '\033[31m' + '"back"' + '\033[0m' + '\n')
if HASH_TYPE == ('back') or HASH_INPUT == ('Back') or HASH_INPUT == ('BACK'):
break
hash_mode_menu()
else:
return (HASH_TYPE)
elif HM_ANSWER == "x": #Return to the Crack Menu
crack_menu()
else:
raw_input("You did not give a valid answer, press any key to try again \n")
os.system('clear')
print''
banner()
#Straight Wordlist_walk
def wordlist_walk():
for dirpath, dirnames, files in os.walk(WORDLIST_DIRECTORY):
for wordlist_filename in files:
abs_wordlist = (os.path.join(dirpath, wordlist_filename))
hc_cmd = ['hashcat', '-a', '0', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), abs_wordlist, '-w', '3', '-O']
subprocess.call(hc_cmd)
if WIRELESS_BOOLEAN:
return
elif HM_ANSWER == '0' or HM_ANSWER == '1' or HM_ANSWER == '2':
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
os.system('clear')
else:
os.system('clear')
#Rule Set Walk
def rule_set_walk():
exten = '*.rule'
for root, dirs, files in os.walk(RULES_DIR):
for filename in fnmatch.filter(files, exten):
abs_rule_set = (os.path.join(root, filename))
hc_cmd = ['hashcat', '-a', '0', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '-w', '3', '-O', '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), SINGLE_WORDLIST, '-r', abs_rule_set]
subprocess.call(hc_cmd)
if WIRELESS_BOOLEAN:
return
elif HM_ANSWER == '0' or HM_ANSWER == '1' or HM_ANSWER == '2':
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
os.system('clear')
else:
os.system('clear')
#Rsmangler Rule Set - {5 ANY Characters RIGHT --> LEFT incremental}
def rsmangler_rule_set():
hash_answer()
hc = ['hashcat', '-a', '0', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, pot), SINGLE_WORDLIST, '-r', os.path.join(RULES_DIR, 'OneRuleToRuleThemAll.rule'), '-w', '3', '-O']
subprocess.call(hc)
#Right Side
hc1 = ['hashcat', '-a', '6', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), SINGLE_WORDLIST, '?a?a?a?a', '-w', '3', '-O', '--increment']
subprocess.call(hc1)
if WIRELESS_BOOLEAN:
return
elif HM_ANSWER == '0' or HM_ANSWER == '1' or HM_ANSWER == '2':
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
os.system('clear')
else:
os.system('clear')
#LeftSide
hc2 = ['hashcat', '-a', '7', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '?a?a?a?a', SINGLE_WORDLIST, '-w', '3', '-O', '--increment']
subprocess.call(hc2)
if WIRELESS_BOOLEAN:
return
elif HM_ANSWER == '0' or HM_ANSWER == '1' or HM_ANSWER == '2':
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
os.system('clear')
else:
os.system('clear')
#Crack Menu 0 - Try all words lists merged List - Common Credentials
#Updated and merged all smaller wordlists into one file for more effcient testing
#Added ruleset to add iterations to the based wordset
#(find . -name "*.txt" | xarg cat >> ./mergedfile.txt)
def crack_menu_0():
global DEFAULT_CEWL_FILE_OUTPUT
global CEWL_BOOLEAN
global FILE_HASH_BOOLEAN
global SINGLE_WORDLIST
global WIRELESS_BOOLEAN
global HASH_PATH_AND_NAME
WORDLIST_DIRECTORY = "/mnt/storage-2TB/wordlists" #Needed to reset the wordlist directory.
if ALL_MENU:
pot_function()
else:
hash_mode_menu()
pot_function()
if CEWL_BOOLEAN and FILE_HASH_BOOLEAN or SINGLE_HASH_BOOLEAN and CEWL_BOOLEAN:
SINGLE_WORDLIST = DEFAULT_CEWL_FILE_OUTPUT
elif WIRELESS_BOOLEAN:
HASH_PATH_AND_NAME = os.path.join(WIRELESS_UPLOAD_DIR, WIRELESS_INPUT)
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, 'merged_list/sp00ks_merged_file_uniq.txt')
else:
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, 'merged_list/sp00ks_merged_file_uniq.txt')
hc_cmd1 = ['hashcat', '-a', '0', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), SINGLE_WORDLIST, '-r', os.path.join(RULES_DIR, 'OneRuleToRuleThemAll.rule'), '-w', '3', '-O']
subprocess.call(hc_cmd1)
if WIRELESS_BOOLEAN:
return
elif HM_ANSWER == '0':
hc_cmd2 = ['hashcat', '-m', HASH_TYPE, '-a', '0', '--username', '--session', 'all', '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME]
subprocess.call(hc_cmd2)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
elif HM_ANSWER == '1' or HM_ANSWER == '2':
hc_cmd3 = ['hashcat', '-m', HASH_TYPE, '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--session', 'all']
subprocess.call(hc_cmd3)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
else:
return
#Crack Menu 1 - Try all words lists between 1GB < 4GB
def crack_menu_1():
global WORDLIST_DIRECTORY
WORDLIST_DIRECTORY = "/mnt/storage-2TB/wordlists" # Needed to reset the wordlist directory.
WORDLIST_DIRECTORY = os.path.join(WORDLIST_DIRECTORY, '1GB-4GB')
if ALL_MENU:
pot_function()
wordlist_walk()
os.system('clear')
return
else:
hash_mode_menu()
pot_function()
wordlist_walk()
os.system('clear')
return
#Crack Menu 2 - Special Wordlists Collection UK & US Cities
def crack_menu_2():
WORDLIST_DIRECTORY = "/mnt/storage-2TB/wordlists" # Needed to reset the wordlist directory.
global DEFAULT_CEWL_FILE_OUTPUT
global HASH_PATH_AND_NAME
global SINGLE_HASH_BOOLEAN
global FILE_HASH_BOOLEAN
global RULE_SET_DIRECTORY
if CEWL_BOOLEAN and FILE_HASH_BOOLEAN or SINGLE_HASH_BOOLEAN and CEWL_BOOLEAN or WIRELESS_BOOLEAN and CEWL_BOOLEAN:
SINGLE_WORDLIST = DEFAULT_CEWL_FILE_OUTPUT
elif WIRELESS_BOOLEAN and not CEWL_BOOLEAN:
HASH_PATH_AND_NAME = os.path.join(WIRELESS_UPLOAD_DIR, WIRELESS_INPUT)
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, 'special/uk-cities.txt')
else:
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, 'special/uk-cities.txt')
WORDLIST_DIRECTORY = "/mnt/storage-2TB/wordlists" # Needed to reset the wordlist directory.
if ALL_MENU:
pot_function()
else:
hash_mode_menu()
pot_function()
os.system('clear')
hc = ['hashcat', '-a', '0', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), SINGLE_WORDLIST, '-r', os.path.join(RULES_DIR, 'OneRuleToRuleThemAll.rule'), '-w', '3', '-O']
subprocess.call(hc)
if WIRELESS_BOOLEAN:
return
elif HM_ANSWER == '0':
hc_cmd2 = ['hashcat', '-m', HASH_TYPE, '-a', '0', '--username', '--session', 'all', '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME]
subprocess.call(hc_cmd2)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
elif HM_ANSWER == '1' or HM_ANSWER == '2':
hc_cmd3 = ['hashcat', '-m', HASH_TYPE, '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_ABS_PATH, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--session', 'all']
subprocess.call(hc_cmd3)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
else:
return
#Crack_Menu 3
def crack_menu_3():
global HASH_PATH_AND_NAME
WORDLIST_DIRECTORY = "/mnt/storage-2TB/wordlists" # Needed to reset the wordlist directory.
if ALL_MENU:
pot_function()
else:
hash_mode_menu()
pot_function()
if CEWL_BOOLEAN and FILE_HASH_BOOLEAN or SINGLE_HASH_BOOLEAN and CEWL_BOOLEAN:
SINGLE_WORDLIST = DEFAULT_CEWL_FILE_OUTPUT
elif WIRELESS_BOOLEAN:
HASH_PATH_AND_NAME = os.path.join(WIRELESS_UPLOAD_DIR, WIRELESS_INPUT)
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, '4GB+/weakpass_2p')
else:
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, '4GB+/weakpass_2p')
hc_cmd1 = ['hashcat', '-a', '0', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), SINGLE_WORDLIST, '-w', '3', '-O']
subprocess.call(hc_cmd1)
if WIRELESS_BOOLEAN:
return
elif HM_ANSWER == '0':
hc_cmd2 = ['hashcat', '-m', HASH_TYPE, '-a', '0', '--username', '--session', 'all', '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME]
subprocess.call(hc_cmd2)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
elif HM_ANSWER == '1' or HM_ANSWER == '2':
hc_cmd3 = ['hashcat', '-m', HASH_TYPE, '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_ABS_PATH, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--session', 'all']
subprocess.call(hc_cmd3)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
else:
return
#Crack Menu 4 - Try all words lists 4GB+ - (will take a while to cache each wordlist prior to testing)
def crack_menu_4():
global WORDLIST_DIRECTORY
WORDLIST_DIRECTORY = "/mnt/storage-2TB/wordlists" # Needed to reset the wordlist directory.
WORDLIST_DIRECTORY = os.path.join(WORDLIST_DIRECTORY, '4GB+')
if ALL_MENU:
pot_function()
wordlist_walk()
os.system('clear')
return
else:
hash_mode_menu()
pot_function()
wordlist_walk()
os.system('clear')
return
#Crack Menu 5 - Oxford Dic, capital letter, upto 4 characters, incrementally - RIGHT SIDE
def crack_menu_5():
WORDLIST_DIRECTORY = "/mnt/storage-2TB/wordlists" # Needed to reset the wordlist directory.
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, 'english-words/words_first_letter_upper.txt')
if ALL_MENU:
pot_function()
os.system('clear')
else:
hash_mode_menu()
pot_function()
os.system('clear')
hc = ['hashcat', '-a', '6', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), SINGLE_WORDLIST, '?a?a?a?a', '-w', '3', '-O', '--increment']
subprocess.call(hc)
if WIRELESS_BOOLEAN:
return
elif HM_ANSWER == '0':
hc_cmd2 = ['hashcat', '-m', HASH_TYPE, '-a', '0', '--username', '--session', 'all', '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME]
subprocess.call(hc_cmd2)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
elif HM_ANSWER == '1' or HM_ANSWER == '2':
hc_cmd3 = ['hashcat', '-m', HASH_TYPE, '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--session', 'all']
subprocess.call(hc_cmd3)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
else:
return
#Crack Menu 6 - Oxford Dic, capital letter, upto 4 characters, incrementally - LEFT SIDE
def crack_menu_6():
WORDLIST_DIRECTORY = "/mnt/storage-2TB/wordlists" # Needed to reset the wordlist directory.
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, 'english-words/words_first_letter_upper.txt')
if ALL_MENU:
pot_function()
else:
hash_mode_menu()
pot_function()
os.system('clear')
hc = ['hashcat', '-a', '7', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '?a?a?a?a', SINGLE_WORDLIST, '-w', '3', '-O', '--increment']
subprocess.call(hc)
if WIRELESS_BOOLEAN:
return
elif HM_ANSWER == '0':
hc_cmd2 = ['hashcat', '-m', HASH_TYPE, '-a', '0', '--username', '--session', 'all', '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME]
subprocess.call(hc_cmd2)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
elif HM_ANSWER == '1' or HM_ANSWER == '2':
hc_cmd3 = ['hashcat', '-m', HASH_TYPE, '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--session', 'all']
subprocess.call(hc_cmd3)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
else:
return
#Crack Menu 7 - Try Oxford Dictionary Starting with UPPER Case + {upto 4 Numbers LEFT SIDE, upto 4 numbers RIGHT SIDE}
def crack_menu_7():
WORDLIST_DIRECTORY = "/mnt/storage-2TB/wordlists" # Needed to reset the wordlist directory.
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, 'english-words/words_first_letter_upper.txt')
if ALL_MENU:
pot_function()
else:
hash_mode_menu()
pot_function()
os.system('clear')
#Four Numbers (Left Side)
hc1 = ['hashcat', '-a', '7', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '?d?d?d?d', SINGLE_WORDLIST, '-w', '3', '-O', '--increment']
subprocess.call(hc1)
if WIRELESS_BOOLEAN:
return
elif HM_ANSWER == '0' or HM_ANSWER == '1' or HM_ANSWER == '2':
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
os.system('clear')
else:
os.system('clear')
#Four Numbers (Right Side)
hc2 = ['hashcat', '-a', '6', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), SINGLE_WORDLIST, '?d?d?d?d', '-w', '3', '-O', '--increment']
subprocess.call(hc2)
if WIRELESS_BOOLEAN:
return
elif HM_ANSWER == '0':
hc_cmd2 = ['hashcat', '-m', HASH_TYPE, '-a', '0', '--username', '--session', 'all', '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME]
subprocess.call(hc_cmd2)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
elif HM_ANSWER == '1' or HM_ANSWER == '2':
hc_cmd3 = ['hashcat', '-m', HASH_TYPE, '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format3'), '--outfile-format', '2', HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--session', 'all']
subprocess.call(hc_cmd3)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
else:
return
#Crack Menu 8 - Automated Testing - Oxford Dictionary MIXED CASE + upto 3 ANY Characters on RIGHT SIDE - {Corporate Scan}
def crack_menu_8():
WORDLIST_DIRECTORY = "/mnt/storage-2TB/wordlists" # Needed to reset the wordlist directory.
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, 'english-words/words.txt')
if ALL_MENU:
pot_function()
else:
hash_mode_menu()
pot_function()
os.system('clear')
hc = ['hashcat', '-a', '6', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), SINGLE_WORDLIST, '?a?a?a?a', '-w', '3', '-O', '--increment']
subprocess.call(hc)
if WIRELESS_BOOLEAN:
return
elif HM_ANSWER == '0':
hc_cmd2 = ['hashcat', '-m', HASH_TYPE, '-a', '0', '--username', '--session', 'all', '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME]
subprocess.call(hc_cmd2)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
elif HM_ANSWER == '1' or HM_ANSWER == '2':
hc_cmd3 = ['hashcat', '-m', HASH_TYPE, '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--session', 'all']
subprocess.call(hc_cmd3)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
else:
return
#Crack Menu 9 - Rockyou with rule - d3ad0ne
def crack_menu_9():
WORDLIST_DIRECTORY = "/mnt/storage-2TB/wordlists" # Needed to reset the wordlist directory.
global DEFAULT_CEWL_FILE_OUTPUT
global HASH_PATH_AND_NAME
global SINGLE_HASH_BOOLEAN
global FILE_HASH_BOOLEAN
global RULE_SET_DIRECTORY
if CEWL_BOOLEAN and FILE_HASH_BOOLEAN or SINGLE_HASH_BOOLEAN and CEWL_BOOLEAN or WIRELESS_BOOLEAN and CEWL_BOOLEAN:
SINGLE_WORDLIST = DEFAULT_CEWL_FILE_OUTPUT
elif WIRELESS_BOOLEAN and not CEWL_BOOLEAN:
HASH_PATH_AND_NAME = os.path.join(WIRELESS_UPLOAD_DIR, WIRELESS_INPUT)
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, 'rockyou.txt')
else:
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, 'rockyou.txt')
if ALL_MENU:
pot_function()
else:
hash_mode_menu()
pot_function()
os.system('clear')
hc = ['hashcat', '-a', '0', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), SINGLE_WORDLIST, '-r', os.path.join(RULES_DIR, 'd3ad0ne.rule'), '-w', '3', '-O']
subprocess.call(hc)
if WIRELESS_BOOLEAN:
return
elif HM_ANSWER == '0':
hc_cmd2 = ['hashcat', '-m', HASH_TYPE, '-a', '0', '--username', '--session', 'all', '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME]
subprocess.call(hc_cmd2)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
elif HM_ANSWER == '1' or HM_ANSWER == '2':
hc_cmd3 = ['hashcat', '-m', HASH_TYPE, '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_ABS_PATH, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--session', 'all']
subprocess.call(hc_cmd3)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
else:
return
#Crack Menu 10 - Rockyou with rule - OneRuleToRuleThemAll
def crack_menu_10():
WORDLIST_DIRECTORY = "/mnt/storage-2TB/wordlists" # Needed to reset the wordlist directory.
global SINGLE_HASH_BOOLEAN
global FILE_HASH_BOOLEAN
global HASH_PATH_AND_NAME
global RULE_SET_DIRECTORY
if CEWL_BOOLEAN and FILE_HASH_BOOLEAN or SINGLE_HASH_BOOLEAN and CEWL_BOOLEAN or WIRELESS_BOOLEAN and CEWL_BOOLEAN:
SINGLE_WORDLIST = DEFAULT_CEWL_FILE_OUTPUT
elif WIRELESS_BOOLEAN:
HASH_PATH_AND_NAME = os.path.join(WIRELESS_UPLOAD_DIR, WIRELESS_INPUT)
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, 'rockyou.txt')
else:
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, 'rockyou.txt')
if ALL_MENU:
pot_function()
else:
hash_mode_menu()
pot_function()
os.system('clear')
hc = ['hashcat', '-a', '0', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), SINGLE_WORDLIST, '-r', os.path.join(RULES_DIR, 'OneRuleToRuleThemAll.rule'), '-w', '3', '-O']
subprocess.call(hc)
if WIRELESS_BOOLEAN:
return
elif HM_ANSWER == '0':
hc_cmd2 = ['hashcat', '-m', HASH_TYPE, '-a', '0', '--username', '--session', 'all', '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_ABS_PATH]
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
subprocess.call(hc_cmd2)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
elif HM_ANSWER == '1' or HM_ANSWER == '2':
hc_cmd3 = ['hashcat', '-m', HASH_TYPE, '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--session', 'all']
subprocess.call(hc_cmd3)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
else:
return
#Crack Menu 11 - Rockyou with rule - # Changed to add leet speak rules
def crack_menu_11():
WORDLIST_DIRECTORY = "/mnt/storage-2TB/wordlists" # Needed to reset the wordlist directory.
global DEFAULT_CEWL_FILE_OUTPUT
global HASH_PATH_AND_NAME
if CEWL_BOOLEAN and FILE_HASH_BOOLEAN or SINGLE_HASH_BOOLEAN and CEWL_BOOLEAN or WIRELESS_BOOLEAN and CEWL_BOOLEAN:
SINGLE_WORDLIST = DEFAULT_CEWL_FILE_OUTPUT
elif WIRELESS_BOOLEAN:
HASH_PATH_AND_NAME = os.path.join(WIRELESS_UPLOAD_DIR, WIRELESS_INPUT)
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, 'rockyou.txt')
else:
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, 'rockyou.txt')
if ALL_MENU:
pot_function()
else:
hash_mode_menu()
pot_function()
os.system('clear')
hc1 = ['hashcat', '-a', '0', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), SINGLE_WORDLIST, '-r', os.path.join(RULES_DIR, 'leetspeak.rule'), '-w', '3', '-O']
subprocess.call(hc1)
hc2 = ['hashcat', '-a', '0', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), SINGLE_WORDLIST, '-r', os.path.join(RULES_DIR, 'unix-ninja-leetspeak.rule'), '-w', '3', '-O']
subprocess.call(hc2)
if WIRELESS_BOOLEAN:
return
elif HM_ANSWER == '0':
hc_cmd2 = ['hashcat', '-m', HASH_TYPE, '-a', '0', '--username', '--session', 'all', '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME]
subprocess.call(hc_cmd2)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
elif HM_ANSWER == '1' or HM_ANSWER == '2':
hc_cmd3 = ['hashcat', '-m', HASH_TYPE, '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--session', 'all']
subprocess.call(hc_cmd3)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
else:
return
#Crack Menu 12 - Rockastic with OneRuleToRuleThemAll
def crack_menu_12():
WORDLIST_DIRECTORY = "/mnt/storage-2TB/wordlists" # Needed to reset the wordlist directory.
global DEFAULT_CEWL_FILE_OUTPUT
global FILE_HASH_BOOLEAN
global HASH_PATH_AND_NAME
if CEWL_BOOLEAN and FILE_HASH_BOOLEAN or SINGLE_HASH_BOOLEAN and CEWL_BOOLEAN or WIRELESS_BOOLEAN and CEWL_BOOLEAN:
SINGLE_WORDLIST = DEFAULT_CEWL_FILE_OUTPUT
elif WIRELESS_BOOLEAN:
HASH_PATH_AND_NAME = os.path.join(WIRELESS_UPLOAD_DIR, WIRELESS_INPUT)
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, '4GB+/Rocktastic12a.txt')
else:
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, '4GB+/Rocktastic12a.txt')
if ALL_MENU:
pot_function()
else:
hash_mode_menu()
pot_function()
os.system('clear')
hc = ['hashcat', '-a', '0', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), SINGLE_WORDLIST, '-r', os.path.join(RULES_DIR, 'OneRuleToRuleThemAll.rule'), '-w', '3', '-O']
subprocess.call(hc)
if WIRELESS_BOOLEAN:
return
elif HM_ANSWER == '0':
hc_cmd2 = ['hashcat', '-m', HASH_TYPE, '-a', '0', '--username', '--session', 'all', '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME]
subprocess.call(hc_cmd2)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
elif HM_ANSWER == '1' or HM_ANSWER == '2':
hc_cmd3 = ['hashcat', '-m', HASH_TYPE, '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--session', 'all']
subprocess.call(hc_cmd3)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
else:
return
#Crack Menu 13 - Rocktastic with dive rule
def crack_menu_13():
WORDLIST_DIRECTORY = "/mnt/storage-2TB/wordlists" # Needed to reset the wordlist directory.
global DEFAULT_CEWL_FILE_OUTPUT
global HASH_PATH_AND_NAME
global SINGLE_HASH_BOOLEAN
global FILE_HASH_BOOLEAN
global RULE_SET_DIRECTORY
if CEWL_BOOLEAN and FILE_HASH_BOOLEAN or SINGLE_HASH_BOOLEAN and CEWL_BOOLEAN or WIRELESS_BOOLEAN and CEWL_BOOLEAN:
SINGLE_WORDLIST = DEFAULT_CEWL_FILE_OUTPUT
elif WIRELESS_BOOLEAN:
HASH_PATH_AND_NAME = os.path.join(WIRELESS_UPLOAD_DIR, WIRELESS_INPUT)
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, '4GB+/Rocktastic12a.txt')
else:
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, '4GB+/Rocktastic12a.txt')
if ALL_MENU:
pot_function()
else:
hash_mode_menu()
pot_function()
os.system('clear')
hc = ['hashcat', '-a', '0', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), SINGLE_WORDLIST, '-r', os.path.join(RULES_DIR, 'dive.rule'), '-w', '3', '-O']
subprocess.call(hc)
if WIRELESS_BOOLEAN:
return
elif HM_ANSWER == '0':
hc_cmd2 = ['hashcat', '-m', HASH_TYPE, '-a', '0', '--username', '--session', 'all', '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME]
subprocess.call(hc_cmd2)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
elif HM_ANSWER == '1' or HM_ANSWER == '2':
hc_cmd3 = ['hashcat', '-m', HASH_TYPE, '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--session', 'all']
subprocess.call(hc_cmd3)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
else:
return
#Crack Menu 14 - Rocktastic with Hob0Rules -> Quick {hob064.rule} -> Comprenensive Test {d3adhob0.rule}
def crack_menu_14():
WORDLIST_DIRECTORY = "/mnt/storage-2TB/wordlists" # Needed to reset the wordlist directory.
global SINGLE_HASH_BOOLEAN
global FILE_HASH_BOOLEAN
global HASH_PATH_AND_NAME
global RULE_SET_DIRECTORY
if CEWL_BOOLEAN and FILE_HASH_BOOLEAN or SINGLE_HASH_BOOLEAN and CEWL_BOOLEAN or WIRELESS_BOOLEAN and CEWL_BOOLEAN:
SINGLE_WORDLIST = DEFAULT_CEWL_FILE_OUTPUT
elif WIRELESS_BOOLEAN:
HASH_PATH_AND_NAME = os.path.join(WIRELESS_UPLOAD_DIR, WIRELESS_INPUT)
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, '4GB+/Rocktastic12a.txt')
else:
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, '4GB+/Rocktastic12a.txt')
if ALL_MENU:
pot_function()
else:
hash_mode_menu()
pot_function()
os.system('clear')
hc1 = ['hashcat', '-a', '0', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), SINGLE_WORDLIST, '-r', os.path.join(RULES_DIR, 'hob064.rule'), '-w', '3', '-O']
subprocess.call(hc1)
if WIRELESS_BOOLEAN:
return
elif HM_ANSWER == '0' or HM_ANSWER == '1' or HM_ANSWER == '2':
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
os.system('clear')
else:
os.system('clear')
hc2 = ['hashcat', '-a', '0', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), SINGLE_WORDLIST, '-r', os.path.join(RULES_DIR, 'd3adhob0.rule'), '-w', '3', '-O']
subprocess.call(hc2)
if HM_ANSWER == '0':
hc_cmd2 = ['hashcat', '-m', HASH_TYPE, '-a', '0', '--username', '--session', 'all', '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME]
subprocess.call(hc_cmd2)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
elif HM_ANSWER == '1' or HM_ANSWER == '2':
hc_cmd3 = ['hashcat', '-m', HASH_TYPE, '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--session', 'all']
subprocess.call(hc_cmd3)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
else:
return
#Crack Menu 15 - Auto Multi Rule Test - Iterate through each rule with rockyou.txt - {Corporate Scan}
def crack_menu_15():
WORDLIST_DIRECTORY = "/mnt/storage-2TB/wordlists" # Needed to reset the wordlist directory.
global SINGLE_WORDLIST
global DEFAULT_CEWL_FILE_OUTPUT
global HASH_ABS_PATH
global RULE_SET_DIRECTORY
if CEWL_BOOLEAN and FILE_HASH_BOOLEAN or SINGLE_HASH_BOOLEAN and CEWL_BOOLEAN or WIRELESS_BOOLEAN and CEWL_BOOLEAN:
SINGLE_WORDLIST = DEFAULT_CEWL_FILE_OUTPUT
elif WIRELESS_BOOLEAN:
HASH_PATH_AND_NAME = os.path.join(WIRELESS_UPLOAD_DIR, WIRELESS_INPUT)
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, 'rockyou.txt')
else:
SINGLE_WORDLIST = os.path.join(WORDLIST_DIRECTORY, 'rockyou.txt')
if ALL_MENU:
pot_function()
os.system('clear')
else:
hash_mode_menu()
pot_function()
os.system('clear')
rule_set_walk()
return
#Rsmangler - Create multiple permutations of a word - Menu 19)
def rsmangler_menu():
global SINGLE_HASH_BOOLEAN
global SINGLE_WORDLIST
global CEWL_BOOLEAN
global FILE_HASH_BOOLEAN
global WIRELESS_INPUT
global HASH_INPUT
os.system("clear")
banner()
print""
print" For reference, filename loaded - " + '\033[33m' + HASH_INPUT + '\033[0m'
print""
print(' What is the word to be mangled, or type ' + '\033[31m' + '"back"' + '\033[0m' + ' to go back to the main menu' + '\n\n' + ' ')
firmname = raw_input(str(" ------> "))
if firmname == "back" or firmname == "Back" or firmname == "BACK":
main_menu()
else:
firmname = str(firmname)
print""
os.chdir(RSMANGLER_INPUT_DIR)
sh = open(firmname, "w+")
sh.write(firmname + "\n")
sh.close()
rsmangler = os.path.join(TOOLS_DIR, 'rsmangler.rb')
RSMANGLER_OUTPUT_DIR_AND_FIRMNAME = os.path.join(RSMANGLER_OUTPUT_DIR, firmname)
RSMANGLER_INPUT_DIR_AND_FIRMNAME = os.path.join(RSMANGLER_INPUT_DIR, firmname)
rs = [rsmangler, '--file', RSMANGLER_INPUT_DIR_AND_FIRMNAME, '--output', RSMANGLER_OUTPUT_DIR_AND_FIRMNAME]
subprocess.call(rs)
os.system('clear')
banner()
hash_mode_menu()
pot_function()
if SINGLE_HASH_BOOLEAN and CEWL_BOOLEAN == False:
SINGLE_WORDLIST = RSMANGLER_OUTPUT_DIR_AND_FIRMNAME #Space added for correct argument spacing
elif SINGLE_HASH_BOOLEAN and CEWL_BOOLEAN or WIRELESS_BOOLEAN and CEWL_BOOLEAN:
SINGLE_WORDLIST = DEFAULT_CEWL_FILE_OUTPUT
elif FILE_HASH_BOOLEAN and CEWL_BOOLEAN == False:
SINGLE_WORDLIST = RSMANGLER_OUTPUT_DIR_AND_FIRMNAME #Space added for correct argument spacing
elif FILE_HASH_BOOLEAN and CEWL_BOOLEAN:
SINGLE_WORDLIST = DEFAULT_CEWL_FILE_OUTPUT
elif WIRELESS_BOOLEAN and not CEWL_BOOLEAN:
SINGLE_WORDLIST = RSMANGLER_OUTPUT_DIR_AND_FIRMNAME
os.chdir(WIRELESS_UPLOAD_DIR)
else:
pass
os.system('clear')
#Rvrsh3ll Special Prepend Rule Set
hc_prepend = ['hashcat', '-a', '0', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), SINGLE_WORDLIST, '-r', os.path.join(RULES_DIR, 'rvrsh3llspecial_prepend.rule'), '-w', '3', '-O']
subprocess.call(hc_prepend)
#Rvrsh3ll Special Append Rule Set
hc_append = ['hashcat', '-a', '0', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), SINGLE_WORDLIST, '-r', os.path.join(RULES_DIR, 'rvrsh3llspecial_append.rule'), '-w', '3', '-O']
subprocess.call(hc_append)
#Right Side
hc1 = ['hashcat', '-a', '6', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), SINGLE_WORDLIST, '?a?a?a?a', '-w', '3', '-O', '--increment']
subprocess.call(hc1)
if WIRELESS_BOOLEAN:
return
elif HM_ANSWER == '0' or HM_ANSWER == '1' or HM_ANSWER == '2':
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
os.system('clear')
else:
os.system('clear')
#Left Side
hc2 = ['hashcat', '-a', '7', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '?a?a?a?a', SINGLE_WORDLIST, '-w', '3', '-O', '--increment']
subprocess.call(hc2)
if WIRELESS_BOOLEAN:
return
elif HM_ANSWER == '0':
hc_cmd2 = ['hashcat', '-m', HASH_TYPE, '-a', '0', '--username', '--session', 'all', '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME]
subprocess.call(hc_cmd2)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
elif HM_ANSWER == '1' or HM_ANSWER == '2':
hc_cmd3 = ['hashcat', '-m', HASH_TYPE, '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--session', 'all']
subprocess.call(hc_cmd3)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
else:
return
#Cewl menu - Ran first before 17 or 18 can be activated
def cewl_menu_16():
global CEWL_BOOLEAN
global DEFAULT_CEWL_FILE_OUTPUT
global SINGLE_HASH_ABS_PATH
global CEWL_WORDLIST_SIZE
CEWL_BOOLEAN = True
os.system('clear')
banner()
print"We will now make a wordlist based on the given website address"
cewl_url_input = raw_input("Specify the website for collecting the wordlist in full including protocols and ports numbers if non standard:" + '\n')
if SINGLE_HASH_BOOLEAN:
cewl_hash_input = SINGLE_HASH_ABS_PATH + '.cewl-list.txt'
elif FILE_HASH_BOOLEAN:
cewl_hash_input = HASH_INPUT + '.cewl-list.txt'
elif WIRELESS_BOOLEAN:
cewl_hash_input = WIRELESS_INPUT + '.cewl-list.txt'
else:
pass
DEFAULT_CEWL_FILE_OUTPUT = os.path.join(CEWL_UPLOAD_DIR, cewl_hash_input)
cewl = ['cewl', '--depth', '2', '--min_word_length', '5', cewl_url_input, '-v', '-w', DEFAULT_CEWL_FILE_OUTPUT]
subprocess.call(cewl)
os.system('clear')
CEWL_WORDLIST_SIZE = os.popen('wc -l ' + DEFAULT_CEWL_FILE_OUTPUT).read()
banner()
hash_mode_menu()
os.system('clear')
return
#Run straight Cewl Wordlist
def cewl_menu_17():
global SINGLE_WORDLIST
global DEFAULT_CEWL_FILE_OUTPUT
global CEWL_BOOLEAN
global FILE_HASH_BOOLEAN
global WIRELESS_INPUT
if CEWL_BOOLEAN and FILE_HASH_BOOLEAN or SINGLE_HASH_BOOLEAN and CEWL_BOOLEAN:
SINGLE_WORDLIST = DEFAULT_CEWL_FILE_OUTPUT
elif WIRELESS_BOOLEAN and CEWL_BOOLEAN:
SINGLE_WORDLIST = WIRELESS_INPUT
else:
raw_input("Cewl Wordlist not ran yet!, run cewl first, (Option 16)")
crack_menu()
pot_function()
hc = ['hashcat', '-a', '0', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), SINGLE_WORDLIST, '-w', '3', '-O']
subprocess.call(hc)
if WIRELESS_BOOLEAN:
return
elif HM_ANSWER == '0':
hc_cmd2 = ['hashcat', '-m', HASH_TYPE, '-a', '0', '--username', '--session', 'all', '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME]
subprocess.call(hc_cmd2)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
elif HM_ANSWER == '1' or HM_ANSWER == '2':
hc_cmd3 = ['hashcat', '-m', HASH_TYPE, '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--session', 'all']
subprocess.call(hc_cmd3)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
else:
return
return
#Automated Cewl wordlist - {4 ANY Characters RIGHT --> LEFT incrementally} (could take a while dependant on size of cewl wordlist generated)
def cewl_menu_18():
global SINGLE_WORDLIST
global SINGLE_HASH_BOOLEAN
global DEFAULT_CEWL_FILE_OUTPUT
global CEWL_BOOLEAN
global FILE_HASH_BOOLEAN
if CEWL_BOOLEAN and FILE_HASH_BOOLEAN or SINGLE_HASH_BOOLEAN and CEWL_BOOLEAN or WIRELESS_BOOLEAN and CEWL_BOOLEAN:
SINGLE_WORDLIST = DEFAULT_CEWL_FILE_OUTPUT
elif WIRELESS_BOOLEAN and not CEWL_BOOLEAN:
SINGLE_WORDLIST = WIRELESS_INPUT
else:
raw_input("Cewl Wordlist not ran yet!, run cewl first, (Option 16)")
crack_menu()
pot_function()
#Right Side
hc1 = ['hashcat', '-a', '6', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), SINGLE_WORDLIST, '?a?a?a?a', '-w', '3', '-O', '--increment']
subprocess.call(hc1)
#Left Side
hc2 = ['hashcat', '-a', '7', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '?a?a?a?a', SINGLE_WORDLIST, '-w', '3', '-O', '--increment']
subprocess.call(hc2)
#Run against 'dive' Rule
hc3 = ['hashcat', '-a', '0', '-m', HASH_TYPE, HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), SINGLE_WORDLIST, '-r', os.path.join(RULES_DIR, 'dive.rule'), '-w', '3', '-O']
subprocess.call(hc3)
#Run Against 'OneRuleToRuleThemAll' Rule
hc4 = ['hashcat', '-a', '0', '-m', HASH_TYPE, HASH_PATH_AND_NAME, SINGLE_WORDLIST, '-r', os.path.join(RULES_DIR, 'OneRuleToRuleThemAll.rule'), '-w', '3', '-O']
subprocess.call(hc4)
if WIRELESS_BOOLEAN:
return
elif HM_ANSWER == '0':
hc_cmd2 = ['hashcat', '-m', HASH_TYPE, '-a', '0', '--username', '--session', 'all', '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME]
subprocess.call(hc_cmd2)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
elif HM_ANSWER == '1' or HM_ANSWER == '2':
hc_cmd3 = ['hashcat', '-m', HASH_TYPE, '--show', '-o', os.path.join(L00T_POT_DIR, POT + '.format2'), '--outfile-format', '2', HASH_PATH_AND_NAME, '--potfile-path=' + os.path.join(L00T_POT_DIR, POT), '--session', 'all']
subprocess.call(hc_cmd3)
subprocess.call(AWK + os.path.join(L00T_POT_DIR, POT + '.format2') + " | sort > " + os.path.join(L00T_POT_DIR, POT) + '.sorted ', shell=True)
subprocess.call('rm' + ' ' + os.path.join(L00T_POT_DIR, POT + '.format2'), shell=True)
else:
return
#Prince Menu - Option (g)
#Useful attack to start with to test for the password minimum length only amongst other attacks.
#Users often set their passwords based on the minimum password complexity requirements.
def prince_menu():
global DEFAULT_CEWL_FILE_OUTPUT
global FILE_HASH_BOOLEAN