-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsqm.pyw
5430 lines (5138 loc) · 254 KB
/
sqm.pyw
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/python3
# -*- coding: utf-8 -*-
"""gui for SQLmap"""
import os
import re
import subprocess
import tkinter
import tkinter.filedialog
import tkinter.font
import tkinter.ttk
from tkinter import ttk, font
import urllib.parse
# -----------------------------------------
# SQLmap Update
# -----------------------------------------
def update_i_t():
if os.name == "posix":
os.system("gnome-terminal -- /bin/bash -c \"python3 sqlmap.py --update ; exec bash\"")
else:
os.system(u'start cmd /k python sqlmap.py --update')
# ------------------------------------------
# CopyPasteCut
# ------------------------------------------
def r_clicker(e):
try:
def r_click__copy(e, apnd=0):
e.widget.event_generate('<Control-c>')
def r_click__cut(e):
e.widget.event_generate('<Control-x>')
def r_click_paste(e):
e.widget.event_generate('<Control-v>')
e.widget.focus()
nclst = [
(' Cut', lambda e=e: r_click__cut(e)),
(' Copy', lambda e=e: r_click__copy(e)),
(' Paste', lambda e=e: r_click_paste(e)),
]
rmenu = tkinter.Menu(None, tearoff=0, takefocus=0)
for (txt, cmd) in nclst:
rmenu.add_command(label=txt, command=cmd)
rmenu.tk_popup(e.x_root + 40, e.y_root + 10, entry="0")
except tkinter.TclError:
pass
return "break"
def r_clicking(self):
try:
for b in ['Text', 'Entry', 'Listbox', 'Label']:
self.bind_class(b, sequence='<Button-3>', func=r_clicker, add='')
except tkinter.TclError:
pass
class MainApplication(tkinter.Frame):
def __init__(self, mw):
tkinter.Frame.__init__(self, mw)
self.grid(sticky='nswe')
# Hot Keys: ######################################
mw.bind('<F1>', self.help__f1)
mw.bind('<Alt-Key-s>', self.alt_key_s)
mw.bind('<Alt-Key-l>', self.alt_key_l)
mw.bind('<Alt-Key-e>', self.alt_key_e)
mw.bind('<F2>', self.commands)
mw.bind('<Shift-Key-F2>', self.inject_it)
mw.bind('<Button-3>', r_clicker, add='')
mw.bind('<Alt-Key-1>', self.alt_key_1)
mw.bind('<Alt-Key-2>', self.alt_key_2)
mw.bind('<Alt-Key-3>', self.alt_key_3)
mw.bind('<Alt-Key-4>', self.alt_key_4)
mw.bind('<Alt-Key-5>', self.alt_key_5)
# ################################################
self.rowconfigure(0, weight=1)
self.columnconfigure(0, weight=1)
self.nRoot = ttk.Notebook(self)
builder_frame = ttk.Frame(self.nRoot)
watch_log = ttk.Frame(self.nRoot)
editor = ttk.Frame(self.nRoot)
help_me = ttk.Frame(self.nRoot)
update_sqlmap = ttk.Frame(self.nRoot)
tampers_list = ttk.Frame(self.nRoot)
self.nRoot.add(builder_frame, text='SQLmap Command Builder')
self.nRoot.add(watch_log, text='Log viewer')
self.nRoot.add(editor, text='Editor')
self.nRoot.add(help_me, text='Help!')
self.nRoot.rowconfigure(0, weight=1)
self.nRoot.columnconfigure(0, weight=1)
self.nRoot.grid(row=0, column=0, sticky='nswe', ipady=3, ipadx=3)
self.nRoot.add(tampers_list, text='Tampers List')
self.nRoot.rowconfigure(0, weight=1)
self.nRoot.columnconfigure(0, weight=1)
self.nRoot.grid(row=0, column=0, sticky='nswe', ipady=3, ipadx=3)
self.nRoot.add(update_sqlmap, text='Update Sqlmap')
self.nRoot.columnconfigure(0, weight=1)
self.nRoot.grid(row=0, column=0, sticky='nswe', ipady=3, ipadx=3)
builder_frame.rowconfigure(0, weight=1)
builder_frame.columnconfigure(0, weight=1)
editor.rowconfigure(0, weight=1)
editor.columnconfigure(0, weight=1)
help_me.rowconfigure(0, weight=1)
help_me.columnconfigure(0, weight=1)
tampers_list.rowconfigure(0, weight=1)
tampers_list.columnconfigure(0, weight=1)
update_sqlmap.rowconfigure(0, weight=1)
update_sqlmap.columnconfigure(0, weight=1)
# Help SqlMAP
lfhelp = ttk.Labelframe(help_me)
lfhelp.grid(sticky='nswe')
scrol_help = ttk.Scrollbar(lfhelp)
scrol_help.grid(row=0, column=1, sticky='ns')
lfhelp.rowconfigure(0, weight=1)
lfhelp.columnconfigure(0, weight=1)
manual_sqlmap = 'python3 sqlmap.py -hh || cmd /k python sqlmap.py -hh || pythonw sqlmap.py -hh'
process = subprocess.Popen(manual_sqlmap, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
output, error = process.communicate()
output_str = output.decode('utf-8')
help_t_x_t = tkinter.Text(lfhelp, yscrollcommand=scrol_help.set, width=73,
height=24, bg='#002B36', fg='#93A1A1')
help_t_x_t.insert('1.0', output_str)
scrol_help.config(command=help_t_x_t.yview)
help_t_x_t.grid(row=0, column=0, ipadx=30, sticky='nswe')
# Tampers List
tmprs_lst = ttk.Labelframe(tampers_list)
tmprs_lst.grid(sticky='nswe')
scrol_tampers = ttk.Scrollbar(tmprs_lst)
scrol_tampers.grid(row=0, column=1, sticky='ns')
tmprs_lst.rowconfigure(0, weight=1)
tmprs_lst.columnconfigure(0, weight=1)
manual_tampers_command = 'python3 sqlmap.py --list-tampers || cmd /k python sqlmap.py --list-tampers ' \
'|| pythonw sqlmap.py --list-tampers'
process = subprocess.Popen(manual_tampers_command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
output, error = process.communicate()
output_str = output.decode('utf-8')
tampers_txt = tkinter.Text(tmprs_lst, yscrollcommand=scrol_tampers.set, width=73,
height=24, bg='#002B36', fg='#93A1A1')
tampers_txt.insert('1.0', output_str)
scrol_tampers.config(command=tampers_txt.yview)
tampers_txt.grid(row=0, column=0, ipadx=30, sticky='nswe')
# Update Sqlmap
rupdate = ttk.Labelframe(update_sqlmap, text='')
rupdate.grid(row=0, column=0, sticky='nswe')
rupdate.columnconfigure(0, weight=1)
rupdate.rowconfigure(0, weight=1)
# Start Update Button
but = ttk.Button(update_sqlmap)
but.config(text="start update", width=15, command=update_i_t)
but.grid(row=3, column=0, sticky='nw')
# EDITOR
request_l_f = ttk.Labelframe(editor, text='')
request_l_f.grid(row=0, column=0, sticky='nswe')
request_l_f.columnconfigure(0, weight=1)
request_l_f.rowconfigure(0, weight=1)
# Open
# Button Panel
rout_panel = ttk.Labelframe(editor, text='')
rout_panel.grid(row=1, sticky='we', columnspan=2)
r_open = ttk.Button(rout_panel, width=15)
r_open.config(text="openReqFile", command=self.open_req_f)
r_open.grid(row=1, column=0, sticky='w')
c_open = ttk.Button(rout_panel, width=15)
c_open.config(text="openConfFile", command=self.open_ini_f)
c_open.grid(row=1, column=1, sticky='w')
r_save = ttk.Button(rout_panel, width=15)
r_save.config(text="saveReqFile", command=self.save_req_f)
r_save.grid(row=1, column=2, sticky='w')
c_save = ttk.Button(rout_panel, width=15)
c_save.config(text="saveConfFile", command=self.save_ini_f)
c_save.grid(row=1, column=3, sticky='w')
self.file_request_save = save_request = {}
save_request['defaultextension'] = '.txt'
save_request['filetypes'] = [('all files', '.*')]
save_request['initialdir'] = './SQM/REQUEST/'
save_request['parent'] = editor
save_request['title'] = 'HTTP Requet FILE'
self.file_ini = open_ini = {}
open_ini['defaultextension'] = '.conf'
open_ini['filetypes'] = [('all files', '.conf')]
open_ini['initialdir'] = './SQM/CONFIGFILE/'
open_ini['parent'] = editor
open_ini['title'] = 'CONFIGFILE'
#
req_file_scr = ttk.Scrollbar(request_l_f)
req_file_scr.grid(row=0, column=1, sticky='ns', columnspan=10)
self.reqFile = tkinter.Text(request_l_f, yscrollcommand=req_file_scr.set, undo=True, height=29, bg='#002B36',
fg='#93A1A1')
req_file_scr.config(command=self.reqFile.yview)
self.reqFile.grid(row=0, column=0, sticky='nswe')
self.reqFile.columnconfigure(0, weight=1)
self.reqFile.rowconfigure(0, weight=1)
# Load Log...
lf_watch_log = ttk.Labelframe(watch_log, text='')
watch_log.rowconfigure(0, weight=1)
watch_log.columnconfigure(0, weight=1)
lf_watch_log.grid(row=0, column=0, sticky='nswe', columnspan=10)
lf_watch_log.rowconfigure(0, weight=1)
lf_watch_log.columnconfigure(0, weight=1)
#
scrol_ses = ttk.Scrollbar(lf_watch_log)
scrol_ses.grid(row=0, column=1, sticky='ns')
#
self.sesTXT = tkinter.Text(lf_watch_log, yscrollcommand=scrol_ses.set, width=73,
height=22, bg='#002B36', fg='#93A1A1')
scrol_ses.config(command=self.sesTXT.yview)
self.sesTXT.grid(row=0, column=0, ipadx=30, sticky='nswe')
self.sesTXT.bind('<F3>', self.on_find)
self.sesTXT.bind('<F4>', self.on_find_all)
# Button Panel
but_panel = ttk.Labelframe(watch_log, text='')
but_panel.grid(row=1, sticky='we', columnspan=2)
logbut = ttk.Button(but_panel, width=3)
logbut.config(text="log", command=self.logs)
logbut.grid(row=1, column=5, sticky='e')
# full log
self.chkLog = ttk.Checkbutton(but_panel)
self.chkLog_var = tkinter.StringVar()
self.chkLog.config(text="full log", variable=self.chkLog_var, onvalue="on",
offvalue="off") # , command= self.chekLog)
self.chkLog.grid(row=1, column=4, sticky='e', padx=10)
#
sesbut = ttk.Button(but_panel, width=10)
sesbut.config(text="session", command=self.session)
sesbut.grid(row=1, column=3, sticky='ws', ipadx=3)
#
self.search_var = tkinter.StringVar()
self.searchEdit = ttk.Entry(but_panel, width=30)
self.searchEdit.config(text="", textvariable=self.search_var)
self.searchEdit.grid(row=1, column=0, sticky='w', padx=3)
self.search_var.set('HotKey: F3-find, F4-find all')
self.searchEdit.bind('<F3>', self.on_find)
self.searchEdit.bind('<F4>', self.on_find_all)
self.sesTXT.bind('<Alt_L><r>', self.logs)
#
ses_fbut = ttk.Button(but_panel, width=15)
ses_fbut.config(text="open session", command=self.f_open_session_file)
ses_fbut.grid(row=1, column=6, sticky='ws', ipadx=3)
self.file_session = options_session = {}
options_session['defaultextension'] = ''
options_session['initialdir'] = './SESSION/'
options_session['parent'] = watch_log
options_session['title'] = 'Open Session FILE'
#
trafbut = ttk.Button(but_panel, width=15)
trafbut.config(text="open traffic", command=self.f_traffic_file)
trafbut.grid(row=1, column=7, sticky='ws')
self.file_traf = options_traf = {}
options_traf['defaultextension'] = ''
options_traf['initialdir'] = './TRAFFIC/'
options_traf['parent'] = watch_log
options_traf['title'] = 'Open Traffic FILE'
#
paned_url = ttk.Panedwindow(builder_frame, orient=tkinter.VERTICAL)
paned_url.columnconfigure(0, weight=1)
paned_url.rowconfigure(0, weight=1)
# TARGETS:
target_variant = ttk.Labelframe(paned_url, text='')
target_variant.columnconfigure(0, weight=1)
paned_url.add(target_variant)
#
url_lf = ttk.Labelframe(paned_url, text='target:')
url_lf.columnconfigure(0, weight=1)
url_lf.columnconfigure(0, weight=1)
paned_url.add(url_lf)
#
self.varTarget = tkinter.StringVar()
rb_url = ttk.Radiobutton(target_variant, text='url', variable=self.varTarget, value="url",
command=self.f_target)
rb_log = ttk.Radiobutton(target_variant, text='logFile', variable=self.varTarget, value="logFile",
command=self.f_target)
rb_bulk_file = ttk.Radiobutton(target_variant, text='bulkFile', variable=self.varTarget, value="bulkFile",
command=self.f_target)
rb_request = ttk.Radiobutton(target_variant, text='requestFile', variable=self.varTarget,
value="requestFile",
command=self.f_target)
rb_dork = ttk.Radiobutton(target_variant, text='googleDork', variable=self.varTarget, value="googleDork",
command=self.f_target)
rb_direct = ttk.Radiobutton(target_variant, text='direct', variable=self.varTarget, value="direct",
command=self.f_target)
rb_config = ttk.Radiobutton(target_variant, text='configFile', variable=self.varTarget, value="configFile",
command=self.f_target)
rb_sitemapurl = ttk.Radiobutton(target_variant, text='sitemapurl', variable=self.varTarget, value="sitemapurl",
command=self.f_target)
rb_url.grid(row=0, column=0, sticky='w')
rb_log.grid(row=0, column=1, sticky='w')
rb_bulk_file.grid(row=0, column=2, sticky='w')
rb_request.grid(row=0, column=3, sticky='w')
rb_dork.grid(row=0, column=4, sticky='w')
rb_direct.grid(row=0, column=5, sticky='w')
rb_config.grid(row=0, column=6, sticky='w')
rb_sitemapurl.grid(row=0, column=7, sticky='w')
self.urlentry = ttk.Combobox(url_lf)
self.urlentry.grid(row=1, column=0, sticky='we')
# query to sqlmap
query_l_f = ttk.Labelframe(paned_url, text='query to sqlmap:')
query_l_f.columnconfigure(0, weight=1)
query_l_f.rowconfigure(0, weight=1)
paned_url.add(query_l_f)
self.sql_var = tkinter.StringVar()
self.sqlEdit = ttk.Entry(query_l_f)
self.sqlEdit.config(text="", textvariable=self.sql_var)
self.sqlEdit.grid(sticky='we')
self.sqlEdit.columnconfigure(0, weight=1)
paned_url.grid(row=0, column=0, sticky='nwe', rowspan=2)
self.noBF = ttk.Notebook(builder_frame)
settings_f = ttk.Frame(self.noBF)
s_det_tech_f = ttk.Frame(self.noBF)
request_f = ttk.Frame(self.noBF)
enumeration_f = ttk.Frame(self.noBF)
api_f = ttk.Frame(self.noBF)
file_f = ttk.Frame(self.noBF)
self.noBF.add(settings_f, text='Settings')
self.noBF.add(s_det_tech_f, text='Injection | Detection | Technique')
self.noBF.add(request_f, text='Request')
self.noBF.add(enumeration_f, text='Enumeration')
self.noBF.add(file_f, text='Access')
self.noBF.add(api_f, text='Api')
self.noBF.columnconfigure(0, weight=1)
self.noBF.grid(sticky='nswe', padx=3, pady=3)
self.noBF.select(tab_id=1)
settings_f.columnconfigure(0, weight=1)
s_det_tech_f.columnconfigure(0, weight=1)
request_f.columnconfigure(0, weight=1)
file_f.columnconfigure(0, weight=1)
api_f.columnconfigure(0, weight=1)
# take query SqlMAP
but = ttk.Button(builder_frame)
but.config(text="get query", width=10, command=self.commands)
#
but.grid(row=3, column=0, sticky='nw')
#
but_inj = ttk.Button(builder_frame)
but_inj.config(text="start", width=10, command=self.inject_it)
but_inj.grid(row=3, column=0, sticky='ne')
# GENERAL
gen_opt_lf = ttk.Labelframe(settings_f, text='General')
gen_opt_lf.grid(row=2, sticky='we', columnspan=2, pady=10)
# --forms Parse and test forms on target url
self.chk_forms = ttk.Checkbutton(gen_opt_lf)
self.chk_forms_var = tkinter.StringVar()
self.chk_forms.config(text="forms", variable=self.chk_forms_var, onvalue="on",
offvalue="off", command=self.f_forms)
self.chk_forms.grid(row=0, column=0, sticky='w')
# --fresh-queries Ignores query results stored in session file
self.chk_fresh = ttk.Checkbutton(gen_opt_lf)
self.chk_fresh_var = tkinter.StringVar()
self.chk_fresh.config(text="fresh-queries", variable=self.chk_fresh_var, onvalue="on",
offvalue="off", command=self.f_fresh)
self.chk_fresh.grid(row=1, column=0, sticky='w', ipadx=3)
# --parse-errors Parse and display DBMS error messages from responses
self.chk_parse_errors = ttk.Checkbutton(gen_opt_lf)
self.chk_parse_errors_var = tkinter.StringVar()
self.chk_parse_errors.config(text="parse-errors", variable=self.chk_parse_errors_var, onvalue="on",
offvalue="off", command=self.chk_parse_errors)
self.chk_parse_errors.grid(row=2, column=0, sticky='w')
# --repair Redump entries having unknown character marker (?)
self.chk_repair = ttk.Checkbutton(gen_opt_lf)
self.chk_repair_var = tkinter.StringVar()
self.chk_repair.config(text="repair", variable=self.chk_repair_var, onvalue="on",
offvalue="off", command=self.f_repair)
self.chk_repair.grid(row=3, column=0, sticky='w')
# --flush-session Flush session file for current target
self.chk_flush = ttk.Checkbutton(gen_opt_lf)
self.chk_flush_var = tkinter.StringVar()
self.chk_flush.config(text="flush-session", variable=self.chk_flush_var, onvalue="on",
offvalue="off", command=self.f_flush)
self.chk_flush.grid(row=0, column=1, sticky='w', ipadx=3)
# --hex Use DBMS hex function(s) for data retrieval
self.chk_hex = ttk.Checkbutton(gen_opt_lf)
self.chk_hex_var = tkinter.StringVar()
self.chk_hex.config(text="hex", variable=self.chk_hex_var, onvalue="on",
offvalue="off", command=self.f_hex)
self.chk_hex.grid(row=1, column=1, sticky='w')
# --eta Display for each output the estimated time of arrival
self.chk_eta = ttk.Checkbutton(gen_opt_lf)
self.chk_eta_var = tkinter.StringVar()
self.chk_eta.config(text="eta", variable=self.chk_eta_var, onvalue="on",
offvalue="off", command=self.f_eta)
self.chk_eta.grid(row=2, column=1, sticky='w')
# --batch Never ask for user input, use the default behaviour
self.chk_batch = ttk.Checkbutton(gen_opt_lf)
self.chk_batch_var = tkinter.StringVar()
self.chk_batch.config(text="batch", variable=self.chk_batch_var, onvalue="on",
offvalue="off", command=self.f_batch)
self.chk_batch.grid(row=4, column=0, sticky='w', ipadx=3)
# --no-logging Stop logging
self.chk_no_logging = ttk.Checkbutton(gen_opt_lf)
self.chk_no_logging_var = tkinter.StringVar()
self.chk_no_logging.config(text="no-logging", variable=self.chk_no_logging_var, onvalue="on",
offvalue="off", command=self.f_no_logging)
self.chk_no_logging.grid(row=4, column=1, sticky='w', ipadx=3)
# --crawl=CRAWLDEPTH Crawl the website starting from the target url
self.chk_crawl = ttk.Checkbutton(gen_opt_lf)
self.chkCrawl_var = tkinter.StringVar()
self.chk_crawl.config(text="crawl", variable=self.chkCrawl_var, onvalue="on",
offvalue="off", command=self.f_crawl)
self.chk_crawl.grid(row=1, column=2, sticky='w')
#
self.e_crawl = ttk.Combobox(gen_opt_lf)
self.e_crawl_value = tkinter.StringVar()
self.e_crawl.config(textvariable=self.e_crawl_value, state='disabled', width=3)
self.e_crawl['values'] = ('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '50', '100')
self.e_crawl.current(0)
self.e_crawl.bind('<<ComboboxSelected>>', self.f_crawl)
self.e_crawl.grid(row=1, column=3, sticky='w', padx=3)
# --crawl-exclude=.. Regexp to exclude pages from crawling (e.g. "logout")
self.chk_crawl_exclude = ttk.Checkbutton(gen_opt_lf)
self.chk_crawl_exclude_var = tkinter.StringVar()
self.chk_crawl_exclude.config(text="crawl-exclude", variable=self.chk_crawl_exclude_var, onvalue="on",
offvalue="off", command=self.f_crawl_exclude)
self.chk_crawl_exclude.grid(row=2, column=2, sticky='w')
#
self.e_crawl_exclude = ttk.Combobox(gen_opt_lf)
self.e_crawl_exclude_value = tkinter.StringVar()
self.e_crawl_exclude.config(textvariable=self.e_crawl_exclude_value, state='disabled', width=3)
self.e_crawl_exclude['values'] = ('logout')
self.e_crawl_exclude.current(0)
self.e_crawl_exclude.bind('<<ComboboxSelected>>', self.f_crawl_exclude)
self.e_crawl_exclude.grid(row=2, column=3, sticky='w', padx=3)
# --charset=CHARSET Force character encoding used for data retrieval
self.chk_charset = ttk.Checkbutton(gen_opt_lf)
self.chk_charset_var = tkinter.StringVar()
self.chk_charset.config(text="charset", variable=self.chk_charset_var, onvalue="on",
offvalue="off", command=self.f_charset)
self.chk_charset.grid(row=0, column=4, sticky='w')
#
self.e_charset = ttk.Combobox(gen_opt_lf)
self.e_charset_value = tkinter.StringVar()
self.e_charset.config(textvariable=self.e_charset_value, state='disabled', width=7)
self.e_charset['values'] = ('ISO-8859-1', 'ISO-8859-15', 'Big5', 'GBK', 'GB18030', 'UTF-32', 'UTF-8', 'UTF-16',
'UTF-7', 'KOI8-U', 'KOI8-R', 'windows-1251', 'unicodeFFFE')
self.e_charset.current(0)
self.e_charset.bind('<<ComboboxSelected>>', self.f_charset)
self.e_charset.grid(row=0, column=5, sticky='w', padx=3)
# --check-internet Check Internet connection before assesing the target
self.chk_internet_connect = ttk.Checkbutton(gen_opt_lf)
self.chk_internet_connect_var = tkinter.StringVar()
self.chk_internet_connect.config(text="check-internet", variable=self.chk_internet_connect_var, onvalue="on",
offvalue="off", command=self.f_check_connect)
self.chk_internet_connect.grid(row=3, column=1, sticky='w')
# --binary-fields=.. Result fields having binary values (e.g. "digest")
self.chk_binary_fields = ttk.Checkbutton(gen_opt_lf)
self.chk_binary_fields_var = tkinter.StringVar()
self.chk_binary_fields.config(text="binary-fields", variable=self.chk_binary_fields_var, onvalue="on",
offvalue="off", command=self.f_binary_fields)
self.chk_binary_fields.grid(row=2, column=4, sticky='w')
#
self.e_binary_fields = ttk.Combobox(gen_opt_lf)
self.e_binary_fields_value = tkinter.StringVar()
self.e_binary_fields.config(textvariable=self.e_binary_fields_value, state='disabled', width=7)
self.e_binary_fields['values'] = ('digest')
self.e_binary_fields.current(0)
self.e_binary_fields.bind('<<ComboboxSelected>>', self.f_binary_fields)
self.e_binary_fields.grid(row=2, column=5, sticky='w', padx=3)
# --dump-format=DUMPFORMAT Format of dumped data (CSV (default), HTML or SQLITE)
self.chk_dump_format = ttk.Checkbutton(gen_opt_lf)
self.chk_dump_format_var = tkinter.StringVar()
self.chk_dump_format.config(text="dump-format", variable=self.chk_dump_format_var, onvalue="on",
offvalue="off", command=self.f_dump_format)
self.chk_dump_format.grid(row=0, column=6, sticky='w')
#
self.e_dump_format = ttk.Combobox(gen_opt_lf)
self.e_dump_format_value = tkinter.StringVar()
self.e_dump_format.config(textvariable=self.e_dump_format_value, state='disabled', width=7)
self.e_dump_format['values'] = ('CSV', 'HTML', 'SQLITE')
self.e_dump_format.current(0)
self.e_dump_format.bind('<<ComboboxSelected>>', self.f_dump_format)
self.e_dump_format.grid(row=0, column=7, sticky='we', padx=3)
# --encoding=GBK Character encoding used for data retrieval (e.g. GBK)
self.chk_encoding = ttk.Checkbutton(gen_opt_lf)
self.chk_encoding_var = tkinter.StringVar()
self.chk_encoding.config(text="encoding", variable=self.chk_encoding_var, onvalue="on",
offvalue="off", command=self.f_encoding)
self.chk_encoding.grid(row=1, column=4, sticky='w')
#
self.encoding = ttk.Combobox(gen_opt_lf)
self.encoding_value = tkinter.StringVar()
self.encoding.config(textvariable=self.encoding_value, state='disabled', width=7)
self.encoding['values'] = ('GBK', 'ISO-8859-1', 'ISO-8859-15', 'Big5', 'GB18030', 'UTF-32', 'UTF-8', 'UTF-16',
'UTF-7', 'KOI8-U', 'KOI8-R', 'windows-1251', 'unicodeFFFE')
self.encoding.current(0)
self.encoding.bind('<<ComboboxSelected>>', self.f_encoding)
self.encoding.grid(row=1, column=5, sticky='we', padx=3)
# --csv-del=CSVDEL Delimiting character used in CSV output (default ",")
self.chk_csv_del = ttk.Checkbutton(gen_opt_lf)
self.chk_csv_del_var = tkinter.StringVar()
self.chk_csv_del.config(text="csv-del", variable=self.chk_csv_del_var, onvalue="on",
offvalue="off", command=self.f_csv_del)
self.chk_csv_del.grid(row=3, column=4, sticky='w')
#
self.e_csv_del = ttk.Combobox(gen_opt_lf)
self.e_csv_del_value = tkinter.StringVar()
self.e_csv_del.config(textvariable=self.e_csv_del_value, state='disabled', width=7)
self.e_csv_del['values'] = (',', '.')
self.e_csv_del.current(0)
self.e_csv_del.bind('<<ComboboxSelected>>', self.f_csv_del)
self.e_csv_del.grid(row=3, column=5, sticky='w', padx=3)
# --table-prefix=T.. Prefix used for temporary tables (default: "sqlmap")
self.chk_table_prefix = ttk.Checkbutton(gen_opt_lf)
self.chk_table_prefix_var = tkinter.StringVar()
self.chk_table_prefix.config(text="table-prefix", variable=self.chk_table_prefix_var, onvalue="on",
offvalue="off", command=self.f_table_prefix)
self.chk_table_prefix.grid(row=0, column=2, sticky='w')
#
self.e_table_prefix = ttk.Combobox(gen_opt_lf)
self.e_table_prefix_value = tkinter.StringVar()
self.e_table_prefix.config(textvariable=self.e_table_prefix_value, state='disabled', width=3)
self.e_table_prefix['values'] = 'foobar'
self.e_table_prefix.current(0)
self.e_table_prefix.bind('<<ComboboxSelected>>', self.f_table_prefix)
self.e_table_prefix.grid(row=0, column=3, sticky='w', padx=3)
# LABELFRAME START SESSIONFILE
gen_file_lf = ttk.Labelframe(gen_opt_lf, text='')
gen_file_lf.grid(row=5, sticky='we', columnspan=10, rowspan=3)
# --test-filter=TE.. Select tests by payloads and/or titles (e.g. ROW)
self.chk_test_filter = ttk.Checkbutton(gen_opt_lf)
self.chk_test_filter_var = tkinter.StringVar()
self.chk_test_filter.config(text="test-filter", variable=self.chk_test_filter_var, onvalue="on",
offvalue="off", command=self.f_test_filter)
self.chk_test_filter.grid(row=2, column=6, sticky='w')
#
self.e_test_filter = ttk.Combobox(gen_opt_lf)
self.e_test_filter_value = tkinter.StringVar()
self.e_test_filter.config(textvariable=self.e_test_filter_value, state='disabled', width=7)
self.e_test_filter['values'] = ('ORDER BY', 'GROUP BY', 'NULL', 'HAVING', 'EXEC')
self.e_test_filter.current(0)
self.e_test_filter.bind('<<ComboboxSelected>>', self.f_test_filter)
self.e_test_filter.grid(row=2, column=7, sticky='w', padx=3)
# --preprocess Use given script(s) for preprocessing of response data
self.chk_preprocess = ttk.Checkbutton(gen_opt_lf)
self.chk_preprocess_var = tkinter.StringVar()
self.chk_preprocess.config(text="preprocess", variable=self.chk_preprocess_var, onvalue="on",
offvalue="off", command=self.f_pre_process)
self.chk_preprocess.grid(row=3, column=6, sticky='w')
#
self.e_preprocess_var = tkinter.StringVar()
self.e_preprocess = ttk.Entry(gen_opt_lf, width=7)
self.e_preprocess.config(text="", textvariable=self.e_preprocess_var)
self.e_preprocess.grid(row=3, column=7, sticky='w')
self.e_preprocess.columnconfigure(0, weight=1)
# --postprocess Use given script(s) for postprocessing of response data
self.chk_post_process = ttk.Checkbutton(gen_opt_lf)
self.chk_post_process_var = tkinter.StringVar()
self.chk_post_process.config(text="postprocess", variable=self.chk_post_process_var, onvalue="on",
offvalue="off", command=self.f_post_process)
self.chk_post_process.grid(row=4, column=6, sticky='w')
#
self.e_post_process_var = tkinter.StringVar()
self.e_post_process = ttk.Entry(gen_opt_lf, width=7)
self.e_post_process.config(text="", textvariable=self.e_post_process_var)
self.e_post_process.grid(row=4, column=7, sticky='w')
self.e_post_process.columnconfigure(0, weight=1)
# --test-skip=TEST.. Skip tests by payloads and/or titles (e.g. BENCHMARK)
self.chk_test_skip = ttk.Checkbutton(gen_opt_lf)
self.chk_test_skip_var = tkinter.StringVar()
self.chk_test_skip.config(text="test-skip", variable=self.chk_test_skip_var, onvalue="on",
offvalue="off", command=self.f_test_skip)
self.chk_test_skip.grid(row=1, column=6, sticky='w')
#
self.e_test_skip = ttk.Combobox(gen_opt_lf)
self.e_test_skip_value = tkinter.StringVar()
self.e_test_skip.config(textvariable=self.e_test_skip_value, state='disabled', width=7)
self.e_test_skip['values'] = ('BENCHMARK', 'CHAR', 'NULL')
self.e_test_skip.current(0)
self.e_test_skip.bind('<<ComboboxSelected>>', self.f_test_skip)
self.e_test_skip.grid(row=1, column=7, sticky='w', padx=3)
# --disable-precon Disable preconnection of sqlmap (check for 200 answer - may abuse some WAFs)
self.chk_disable_precon = ttk.Checkbutton(gen_opt_lf)
self.chk_disable_precon_var = tkinter.StringVar()
self.chk_disable_precon.config(text="disable-precon", variable=self.chk_disable_precon_var, onvalue="on",
offvalue="off", command=self.f_disable_precon)
self.chk_disable_precon.grid(row=3, column=2, sticky='w')
# --dump-file=DUMP.. Store dumped data to a custom file
self.chk_dump_file = ttk.Checkbutton(gen_opt_lf)
self.chk_dump_file_var = tkinter.StringVar()
self.chk_dump_file.config(text="dump-file", variable=self.chk_dump_file_var, onvalue="on",
offvalue="off", command=self.f_dump_file)
self.chk_dump_file.grid(row=4, column=2, sticky='w')
#
self.e_dump_file_var = tkinter.StringVar()
self.e_dump_file = ttk.Entry(gen_opt_lf, width=7)
self.e_dump_file.config(text="", textvariable=self.e_dump_file_var)
self.e_dump_file.grid(row=4, column=3, sticky='we')
# --abort-on-empty Abort data retrieval on empty results
self.chk_abort_on_empty = ttk.Checkbutton(gen_opt_lf)
self.chk_abort_on_empty_var = tkinter.StringVar()
self.chk_abort_on_empty.config(text="abort-on-empty", variable=self.chk_abort_on_empty_var, onvalue="on",
offvalue="off", command=self.f_abort_on_empty)
self.chk_abort_on_empty.grid(row=4, column=4, sticky='w')
# -s SESSIONFILE Save and resume all data retrieved on a session file
self.chk_session_file = ttk.Checkbutton(gen_file_lf)
self.chk_session_file_var = tkinter.StringVar()
self.chk_session_file.config(text="s SESSIONFILE", variable=self.chk_session_file_var, onvalue="on",
offvalue="off", command=self.f_session_file)
self.chk_session_file.grid(row=4, column=0, sticky='w', ipadx=15)
#
self.e_session_file_var = tkinter.StringVar()
self.e_session_file = ttk.Entry(gen_file_lf, width=20)
self.e_session_file.config(text="", textvariable=self.e_session_file_var)
self.e_session_file.grid(row=4, column=1, sticky='we')
# -t TRAFFICFILE Log all HTTP traffic into a textual file
self.chk_traffic_file = ttk.Checkbutton(gen_file_lf)
self.chk_read_traffic_file_var = tkinter.StringVar()
self.chk_traffic_file.config(text="t TRAFFICFILE", variable=self.chk_read_traffic_file_var, onvalue="on",
offvalue="off", command=self.f_read_traffic_file)
self.chk_traffic_file.grid(row=4, column=2, sticky='w', ipadx=15)
self.e_traffic_file_var = tkinter.StringVar()
self.e_traffic_file = ttk.Entry(gen_file_lf, width=20)
self.e_traffic_file.config(text="", textvariable=self.e_traffic_file_var)
self.e_traffic_file.grid(row=4, column=3, sticky='we')
# --output-dir=OUT.. Custom output directory path
self.chk_output_dir = ttk.Checkbutton(gen_file_lf)
self.chk_output_dir_var = tkinter.StringVar()
self.chk_output_dir.config(text="output-dir", variable=self.chk_output_dir_var, onvalue="on",
offvalue="off", command=self.f_output_dir)
self.chk_output_dir.grid(row=5, column=0, sticky='w', ipadx=15)
#
self.e_output_dir_var = tkinter.StringVar()
self.e_output_dir = ttk.Entry(gen_file_lf, width=20)
self.e_output_dir.config(text="", textvariable=self.e_output_dir_var)
self.e_output_dir.grid(row=5, column=1, sticky='we')
# --save=SAVECONFIG Save options to a configuration INI file
self.chk_save = ttk.Checkbutton(gen_file_lf)
self.chk_Save_var = tkinter.StringVar()
self.chk_save.config(text="save", variable=self.chk_Save_var, onvalue="on",
offvalue="off", command=self.f_save)
self.chk_save.grid(row=5, column=2, sticky='w', ipadx=15)
#
self.var_save_config = tkinter.StringVar()
self.e_save_config = ttk.Entry(gen_file_lf, width=20)
self.e_save_config.config(text="", textvariable=self.var_save_config)
self.e_save_config.grid(row=5, column=3, sticky='we')
# --scope=SCOPE Regexp to filter targets from provided proxy log
self.chk_scope = ttk.Checkbutton(gen_file_lf)
self.chk_scope_var = tkinter.StringVar()
self.chk_scope.config(text="scope", variable=self.chk_scope_var, onvalue="on",
offvalue="off", command=self.f_scope)
self.chk_scope.grid(row=6, column=0, sticky='w', ipadx=15)
#
self.e_scope = ttk.Entry(gen_file_lf, width=20)
self.e_scope.grid(row=6, column=1, sticky='we')
# --har=HARFILE Log all HTTP traffic into a HAR file
self.chk_har = ttk.Checkbutton(gen_file_lf)
self.chk_har_var = tkinter.StringVar()
self.chk_har.config(text="har", variable=self.chk_har_var, onvalue="on",
offvalue="off", command=self.f_har)
self.chk_har.grid(row=6, column=2, sticky='w', ipadx=15)
#
self.var_har_file = tkinter.StringVar()
self.e_har = ttk.Entry(gen_file_lf, width=20)
self.e_har.config(text="", textvariable=self.var_har_file)
self.e_har.grid(row=6, column=3, sticky='we')
# MISCELLANEOUS
# https://github.com/sqlmapproject/sqlmap/commit/5650abbb4a1a35d7b51a53cb62e4f272a2fe69c5#diff-136d7f40c753ef8815a16d28370a9294
miscellaneous_lf = ttk.Labelframe(settings_f, text='Miscellaneous')
miscellaneous_lf.grid(row=6, sticky='we', columnspan=2, pady=10)
# --skip-heuristics Skip heuristic detection of SQLi/XSS vulnerabilities
self.chk_skip_heuristics = ttk.Checkbutton(miscellaneous_lf)
self.chk_skip_heuristics_var = tkinter.StringVar()
self.chk_skip_heuristics.config(text="skip-heuristics", variable=self.chk_skip_heuristics_var, onvalue="on",
offvalue="off", command=self.f_skip_heuristics)
self.chk_skip_heuristics.grid(row=0, column=0, sticky='w')
# --skip-waf Skip heuristic detection of WAF/IPS/IDS protection
self.chk_skip_waf = ttk.Checkbutton(miscellaneous_lf)
self.chk_skip_waf_var = tkinter.StringVar()
self.chk_skip_waf.config(text="skip-waf", variable=self.chk_skip_waf_var, onvalue="on",
offvalue="off", command=self.f_skip_waf)
self.chk_skip_waf.grid(row=1, column=0, sticky='w')
# --offline Work in offline mode (only use session data)
self.chk_offline = ttk.Checkbutton(miscellaneous_lf)
self.chk_offline_var = tkinter.StringVar()
self.chk_offline.config(text="offline", variable=self.chk_offline_var, onvalue="on",
offvalue="off", command=self.f_offline)
self.chk_offline.grid(row=2, column=0, sticky='w')
# --smart Conduct through tests only if positive heuristic(s)
self.chk_smart = ttk.Checkbutton(miscellaneous_lf)
self.chk_smart_var = tkinter.StringVar()
self.chk_smart.config(text="smart", variable=self.chk_smart_var, onvalue="on",
offvalue="off", command=self.f_smart)
self.chk_smart.grid(row=3, column=0, sticky='w')
# --wizard Simple wizard interface for beginner users
self.chk_wizard = ttk.Checkbutton(miscellaneous_lf)
self.chk_wizard_var = tkinter.StringVar()
self.chk_wizard.config(text="wizard", variable=self.chk_wizard_var, onvalue="on",
offvalue="off", command=self.f_wizard)
self.chk_wizard.grid(row=4, column=0, sticky='w')
# --dummy
self.chk_dummy = ttk.Checkbutton(miscellaneous_lf)
self.chk_dummy_var = tkinter.StringVar()
self.chk_dummy.config(text="dummy", variable=self.chk_dummy_var, onvalue="on",
offvalue="off", command=self.f_dummy)
self.chk_dummy.grid(row=5, column=0, sticky='w')
# --smoke-test
self.chk_smoke_test = ttk.Checkbutton(miscellaneous_lf)
self.chk_smoke_test_var = tkinter.StringVar()
self.chk_smoke_test.config(text="smoke-test", variable=self.chk_smoke_test_var, onvalue="on",
offvalue="off", command=self.f_smoke_test)
self.chk_smoke_test.grid(row=6, column=0, sticky='w')
# --dependencies Check for missing sqlmap dependencies
self.chk_dependencies = ttk.Checkbutton(miscellaneous_lf)
self.chk_dependencies_var = tkinter.StringVar()
self.chk_dependencies.config(text="dependencies", variable=self.chk_dependencies_var, onvalue="on",
offvalue="off", command=self.f_dependencies)
self.chk_dependencies.grid(row=0, column=1, sticky='w', ipadx=10)
# --mobile Imitate smartphone through HTTP User-Agent header
self.chk_mobile = ttk.Checkbutton(miscellaneous_lf)
self.chk_mobile_var = tkinter.StringVar()
self.chk_mobile.config(text="mobile", variable=self.chk_mobile_var, onvalue="on",
offvalue="off", command=self.f_mobile)
self.chk_mobile.grid(row=1, column=1, sticky='w')
# --page-rank Display page rank (PR) for Google dork results
self.chk_page_rank = ttk.Checkbutton(miscellaneous_lf)
self.chk_page_rank_var = tkinter.StringVar()
self.chk_page_rank.config(text="page-rank", variable=self.chk_page_rank_var, onvalue="on",
offvalue="off", command=self.f_page_rank)
self.chk_page_rank.grid(row=2, column=1, sticky='w')
# --cleanup Clean up the DBMS by sqlmap specific UDF and tables
self.chk_cleanup = ttk.Checkbutton(miscellaneous_lf)
self.chk_cleanup_var = tkinter.StringVar()
self.chk_cleanup.config(text="cleanup", variable=self.chk_cleanup_var, onvalue="on",
offvalue="off", command=self.f_cleanup)
self.chk_cleanup.grid(row=3, column=1, sticky='w')
# --murphy-rate
self.chk_murphy = ttk.Checkbutton(miscellaneous_lf)
self.chk_murphy_rate_var = tkinter.StringVar()
self.chk_murphy.config(text="murphy-rate", variable=self.chk_murphy_rate_var, onvalue="on",
offvalue="off", command=self.f_murphy_rate)
self.chk_murphy.grid(row=4, column=1, sticky='w')
# --live-test
self.chk_live_test = ttk.Checkbutton(miscellaneous_lf)
self.chk_live_test_var = tkinter.StringVar()
self.chk_live_test.config(text="live-test", variable=self.chk_live_test_var, onvalue="on",
offvalue="off", command=self.f_live_test)
self.chk_live_test.grid(row=5, column=1, sticky='w')
# --purge Safely remove all content from output directory
self.chk_purge = ttk.Checkbutton(miscellaneous_lf)
self.chk_purge_var = tkinter.StringVar()
self.chk_purge.config(text="purge", variable=self.chk_purge_var, onvalue="on",
offvalue="off", command=self.f_purge)
self.chk_purge.grid(row=6, column=1, sticky='w', ipadx=10)
# --time-limit Run with a time limit in seconds (e.g. 3600)
self.chk_time_limit = ttk.Checkbutton(miscellaneous_lf)
self.chk_time_limit_var = tkinter.StringVar()
self.chk_time_limit.config(text="time-limit", variable=self.chk_time_limit_var, onvalue="on",
offvalue="off", command=self.f_time_limit)
self.chk_time_limit.grid(row=6, column=3, sticky='w')
#
self.e_time_limit = ttk.Combobox(miscellaneous_lf)
self.e_time_limit_value = tkinter.StringVar()
self.e_time_limit.config(textvariable=self.e_time_limit_value, state='disabled', width=5)
self.e_time_limit['values'] = ['3600', '4600', '5600']
self.e_time_limit.current(0)
self.e_time_limit.bind('<<ComboboxSelected>>', self.f_time_limit)
self.e_time_limit.grid(row=6, column=4, sticky='w', padx=5)
# --disable-hashing Disable hash analysis on table dumps
self.chk_disable_hashing = ttk.Checkbutton(miscellaneous_lf)
self.chk_disable_hashing_var = tkinter.StringVar()
self.chk_disable_hashing.config(text="disable-hashing", variable=self.chk_disable_hashing_var, onvalue="on",
offvalue="off", command=self.f_disable_hashing)
self.chk_disable_hashing.grid(row=6, column=5, sticky='w', ipadx=10)
# --unsafe-naming Disable escaping of DBMS identifiers (e.g. \"user\")
self.chk_unsafe_naming = ttk.Checkbutton(miscellaneous_lf)
self.chk_unsafe_naming_var = tkinter.StringVar()
self.chk_unsafe_naming.config(text="unsafe-naming", variable=self.chk_unsafe_naming_var, onvalue="on",
offvalue="off", command=self.f_unsafe_naming)
self.chk_unsafe_naming.grid(row=6, column=2, sticky='w', ipadx=10)
# --base64 Parameter(s) containing Base64 encoded values
self.chk_base64 = ttk.Checkbutton(miscellaneous_lf)
self.chk_base64_var = tkinter.StringVar()
self.chk_base64.config(text="base64", variable=self.chk_base64_var, onvalue="on",
offvalue="off", command=self.f_base64)
self.chk_base64.grid(row=0, column=2, sticky='w')
# --base64 Parameter(s) containing Base64 encoded values
self.chk_base64 = ttk.Checkbutton(miscellaneous_lf)
self.chk_base64_var = tkinter.StringVar()
self.chk_base64.config(text="base64", variable=self.chk_base64_var, onvalue="on",
offvalue="off", command=self.f_base64)
self.chk_base64.grid(row=0, column=2, sticky='w')
# --base64-safe Use URL and filename safe Base64 alphabet
# (Reference: https://en.wikipedia.org/wiki/Base64#URL_applications)
self.chk_base64safe = ttk.Checkbutton(miscellaneous_lf)
self.chk_base64safe_var = tkinter.StringVar()
self.chk_base64safe.config(text='base64-safe', variable=self.chk_base64safe_var, onvalue="on",
offvalue="off", command=self.f_base64safe)
self.chk_base64safe.grid(row=1, column=2, sticky='w', ipadx=10)
# --disable-coloring Disable console output coloring
self.chk_disable_coloring = ttk.Checkbutton(miscellaneous_lf)
self.chk_disable_coloring_var = tkinter.StringVar()
self.chk_disable_coloring.config(text="disable-coloring", variable=self.chk_disable_coloring_var, onvalue="on",
offvalue="off", command=self.f_disable_coloring)
self.chk_disable_coloring.grid(row=2, column=2, sticky='w')
# --beep Sound alert when SQL injection found
self.chk_beep = ttk.Checkbutton(miscellaneous_lf)
self.chk_beep_var = tkinter.StringVar()
self.chk_beep.config(text="beep", variable=self.chk_beep_var, onvalue="on",
offvalue="off", command=self.f_beep)
self.chk_beep.grid(row=3, column=2, sticky='w', ipadx=10)
# --sqlmap-shell Prompt for an interactive sqlmap shell
self.chk_sqlmap_shell = ttk.Checkbutton(miscellaneous_lf)
self.chk_sqlmap_shell_var = tkinter.StringVar()
self.chk_sqlmap_shell.config(text="sqlmap-shell", variable=self.chk_sqlmap_shell_var, onvalue="on",
offvalue="off", command=self.f_sqlmap_shell)
self.chk_sqlmap_shell.grid(row=4, column=2, sticky='w')
# --vuln-test
self.chk_vuln_test = ttk.Checkbutton(miscellaneous_lf)
self.chk_vuln_test_var = tkinter.StringVar()
self.chk_vuln_test.config(text="vuln-test", variable=self.chk_vuln_test_var, onvalue="on",
offvalue="off", command=self.f_vuln_test)
self.chk_vuln_test.grid(row=5, column=2, sticky='w')
# --web-root=WEBROOT Web server document root directory (e.g. "/var/www")
self.chk_web_root = ttk.Checkbutton(miscellaneous_lf)
self.chk_web_root_var = tkinter.StringVar()
self.chk_web_root.config(text="web-root", variable=self.chk_web_root_var, onvalue="on",
offvalue="off", command=self.f_web_root)
self.chk_web_root.grid(row=0, column=3, sticky='w')
#
self.e_web_root = ttk.Combobox(miscellaneous_lf)
self.e_web_root_value = tkinter.StringVar()
self.e_web_root.config(textvariable=self.e_web_root_value, state='disabled', width=10)
self.e_web_root['values'] = ['/var/www/', '/home/www/', '/var/www/html/']
self.e_web_root.current(0)
self.e_web_root.bind('<<ComboboxSelected>>', self.f_web_root)
self.e_web_root.grid(row=0, column=4, sticky='w', padx=5)
# --gpage=GOOGLEPAGE Use Google dork results from specified page number
self.chk_gpage = ttk.Checkbutton(miscellaneous_lf)
self.chk_gpage_var = tkinter.StringVar()
self.chk_gpage.config(text="gpage", variable=self.chk_gpage_var, onvalue="on",
offvalue="off", command=self.f_gpage)
self.chk_gpage.grid(row=1, column=3, sticky='w')
#
self.e_gpage = ttk.Entry(miscellaneous_lf, width=10)
self.e_gpage.grid(row=1, column=4, sticky='w', padx=5)
#
# -z Use short mnemonics (e.g. "flu,bat,ban,tec=EU")
self.chk_z = ttk.Checkbutton(miscellaneous_lf)
self.chk_z_var = tkinter.StringVar()
self.chk_z.config(text="z", variable=self.chk_z_var, onvalue="on",
offvalue="off", command=self.f_z)
self.chk_z.grid(row=2, column=3, sticky='w')
#
self.e_z = ttk.Entry(miscellaneous_lf, width=10)
self.e_z.grid(row=2, column=4, sticky='w', padx=5)
#
# --tmp-dir=TMPDIR Local directory for storing temporary files
self.chk_tmp_dir = ttk.Checkbutton(miscellaneous_lf)
self.chk_tmp_dir_var = tkinter.StringVar()
self.chk_tmp_dir.config(text="tmp-dir", variable=self.chk_tmp_dir_var, onvalue="on",
offvalue="off", command=self.f_tmp_dir)
self.chk_tmp_dir.grid(row=3, column=3, sticky='w')
#
self.e_tmp_dir = ttk.Entry(miscellaneous_lf, width=10)
self.e_tmp_dir.grid(row=3, column=4, sticky='w', padx=5)
#
# --alert=ALERT Run shell command(s) when SQL injection is found
self.chk_alert = ttk.Checkbutton(miscellaneous_lf)
self.chk_alert_var = tkinter.StringVar()
self.chk_alert.config(text="alert", variable=self.chk_alert_var, onvalue="on",
offvalue="off", command=self.f_alert)
self.chk_alert.grid(row=4, column=3, sticky='w')
#
self.e_alert = ttk.Entry(miscellaneous_lf, width=10)
self.e_alert.grid(row=4, column=4, sticky='w', padx=5)
#
# --crack Load and crack hashes from a file (standalone)
self.chk_crack = ttk.Checkbutton(miscellaneous_lf)
self.chk_crack_var = tkinter.StringVar()
self.chk_crack.config(text="crack", variable=self.chk_crack_var, onvalue="on",
offvalue="off", command=self.f_crack)
self.chk_crack.grid(row=5, column=3, sticky='w')
#
self.e_crack_var = tkinter.StringVar()
self.e_crack = ttk.Entry(miscellaneous_lf, width=10)
self.e_crack.config(text="", textvariable=self.e_crack_var)
self.e_crack.grid(row=5, column=4, sticky='w', padx=5)
#
# --answers=ANSWERS Set question answers (e.g. "quit=N,follow=N")
self.chk_answers = ttk.Checkbutton(miscellaneous_lf)
self.chk_answers_var = tkinter.StringVar()
self.chk_answers.config(text="answers", variable=self.chk_answers_var, onvalue="on",
offvalue="off", command=self.f_answers)
self.chk_answers.grid(row=0, column=5, sticky='w')
#
self.e_answers = ttk.Combobox(miscellaneous_lf)
self.e_answers_value = tkinter.StringVar()
self.e_answers.config(textvariable=self.e_answers_value, state='disabled', width=10)
self.e_answers['values'] = ['process=Y']
self.e_answers.current(0)
self.e_answers.bind('<<ComboboxSelected>>', self.f_answers)
self.e_answers.grid(row=0, column=6, sticky='we', padx=5)
#
# --stop-fail
self.chk_stop_fail = ttk.Checkbutton(miscellaneous_lf)
self.chk_stop_fail_var = tkinter.StringVar()
self.chk_stop_fail.config(text="stop-fail", variable=self.chk_stop_fail_var, onvalue="on",
offvalue="off", command=self.f_stop_fail)
self.chk_stop_fail.grid(row=1, column=5, sticky='w')
# --debug
self.chk_debug = ttk.Checkbutton(miscellaneous_lf)
self.chk_debug_var = tkinter.StringVar()
self.chk_debug.config(text="debug", variable=self.chk_debug_var, onvalue="on",
offvalue="off", command=self.f_debug)
self.chk_debug.grid(row=2, column=5, sticky='w')
# --disable-stats
self.chk_disable_stats = ttk.Checkbutton(miscellaneous_lf)
self.chk_disable_stats_var = tkinter.StringVar()
self.chk_disable_stats.config(text="disable-stats", variable=self.chk_disable_stats_var, onvalue="on",
offvalue="off", command=self.f_disable_stats)
self.chk_disable_stats.grid(row=3, column=5, sticky='w')
# --profile
self.chk_profile = ttk.Checkbutton(miscellaneous_lf)
self.chk_profile_var = tkinter.StringVar()
self.chk_profile.config(text="profile", variable=self.chk_profile_var, onvalue="on",
offvalue="off", command=self.f_profile)
self.chk_profile.grid(row=4, column=5, sticky='w')
# --run-case
self.chk_run_case = ttk.Checkbutton(miscellaneous_lf)
self.chk_run_case_var = tkinter.StringVar()
self.chk_run_case.config(text="run-case", variable=self.chk_run_case_var, onvalue="on",
offvalue="off", command=self.f_run_case)
self.chk_run_case.grid(row=5, column=5, sticky='w')
# --force-dbms
self.chk_force_dbms = ttk.Checkbutton(miscellaneous_lf)
self.chk_force_dbms_var = tkinter.StringVar()
self.chk_force_dbms.config(text="force-dbms", variable=self.chk_force_dbms_var, onvalue="on",
offvalue="off", command=self.f_force_dbms)
self.chk_force_dbms.grid(row=1, column=6, sticky='w')
# --force-dns
self.chk_force_dns = ttk.Checkbutton(miscellaneous_lf)
self.chk_force_dns_var = tkinter.StringVar()
self.chk_force_dns.config(text="force-dns", variable=self.chk_force_dns_var, onvalue="on",
offvalue="off", command=self.f_force_dns)
self.chk_force_dns.grid(row=2, column=6, sticky='w')
# --force-pivoting
self.chk_force_pivoting = ttk.Checkbutton(miscellaneous_lf)
self.chk_force_pivoting_var = tkinter.StringVar()
self.chk_force_pivoting.config(text="force-pivoting", variable=self.chk_force_pivoting_var, onvalue="on",
offvalue="off", command=self.f_force_pivoting)
self.chk_force_pivoting.grid(row=3, column=6, sticky='w')
# --unstable If the target is unstable
self.chk_unstable = ttk.Checkbutton(miscellaneous_lf)
self.chk_unstable_var = tkinter.StringVar()
self.chk_unstable.config(text="unstable", variable=self.chk_unstable_var, onvalue="on",
offvalue="off", command=self.f_unstable)
self.chk_unstable.grid(row=4, column=6, sticky='w')
# --results-file Location of CSV results file in multiple targets mode
self.chk_result_file = ttk.Checkbutton(miscellaneous_lf)
self.chk_result_file_var = tkinter.StringVar()
self.chk_result_file.config(text="result-file", variable=self.chk_result_file_var, onvalue="on",
offvalue="off", command=self.f_result_file)
self.chk_result_file.grid(row=5, column=6, sticky='w')
# OPTIMIZATIONS, FINGERPRINT, VERBOSE
optimization_lf = ttk.Labelframe(settings_f, text='Optimizations, Fingerprint, Verbose')
optimization_lf.grid(row=0, sticky='we', pady=10, columnspan=4)
optimization_lf.columnconfigure(0, weight=1)
#
self.chk_optimization = ttk.Checkbutton(optimization_lf)
self.chk_optimization_var = tkinter.StringVar()
self.chk_optimization.config(text="o", variable=self.chk_optimization_var, onvalue="on",
offvalue="off", command=self.f_optimization)
self.chk_optimization.grid(row=0, column=0, sticky='wn', pady=1)
# --predict-output Predict common queries output
self.chk_predict_output = ttk.Checkbutton(optimization_lf)
self.chk_predict_output_var = tkinter.StringVar()
self.chk_predict_output.config(text="predict-output", variable=self.chk_predict_output_var, onvalue="on",
offvalue="off", command=self.f_predict_output)
self.chk_predict_output.grid(row=0, column=1, sticky='w')
# --keep-alive Use persistent HTTP(s) connections
self.chk_keep_alive = ttk.Checkbutton(optimization_lf)
self.chk_keep_alive_var = tkinter.StringVar()
self.chk_keep_alive.config(text="keep-alive", variable=self.chk_keep_alive_var, onvalue="on",
offvalue="off", command=self.f_keep_alive)
self.chk_keep_alive.grid(row=0, column=3, sticky='w')
# --null-connection Retrieve page length without actual HTTP response body
self.chk_null_connection = ttk.Checkbutton(optimization_lf)
self.chk_null_connection_var = tkinter.StringVar()
self.chk_null_connection.config(text="null-connection", variable=self.chk_null_connection_var, onvalue="on",
offvalue="off", command=self.f_null_connection)
self.chk_null_connection.grid(row=0, column=4, sticky='w')
# --threads=THREADS Max number of concurrent HTTP(s) requests (default 1)
self.chk_threads = ttk.Checkbutton(optimization_lf)
self.chk_threads_var = tkinter.StringVar()
self.chk_threads.config(text="threads", variable=self.chk_threads_var, onvalue="on",
offvalue="off", command=self.f_threads)