Skip to content

Commit fc43d1b

Browse files
committed
add: --live-cookies --csrf-retries --skip-heuristics --postprocess
change: --invalid-string --invalid-logical remove: -x add english version
1 parent 15b1d00 commit fc43d1b

23 files changed

+2110
-1107
lines changed

LICENSE

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GNU GENERAL PUBLIC LICENSE
22
Version 3, 29 June 2007
33

4-
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
4+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
55
Everyone is permitted to copy and distribute verbatim copies
66
of this license document, but changing it is not allowed.
77

@@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
645645
GNU General Public License for more details.
646646

647647
You should have received a copy of the GNU General Public License
648-
along with this program. If not, see <http://www.gnu.org/licenses/>.
648+
along with this program. If not, see <https://www.gnu.org/licenses/>.
649649

650650
Also add information on how to contact you by electronic and paper mail.
651651

@@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
664664
You should also get your employer (if you work as a programmer) or school,
665665
if any, to sign a "copyright disclaimer" for the program, if necessary.
666666
For more information on this, and how to apply and follow the GNU GPL, see
667-
<http://www.gnu.org/licenses/>.
667+
<https://www.gnu.org/licenses/>.
668668

669669
The GNU General Public License does not permit incorporating your program
670670
into proprietary programs. If your program is a subroutine library, you
671671
may consider it more useful to permit linking proprietary applications with
672672
the library. If this is what you want to do, use the GNU Lesser General
673673
Public License instead of this License. But first, please read
674-
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
674+
<https://www.gnu.org/licenses/why-not-lgpl.html>.

README.md

Lines changed: 30 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,41 @@
1-
## sqlmap-gtk-zh
1+
## sqlmap-gtk
22
sqlmap GUI, using PyGObject(gtk+3)
33

4-
此GUI只能在linux下运行, 已在Mint 20, kali 2020.4 中通过测试.
5-
win下可以使用[sqlmap-wx](https://github.com/needle-wang/sqlmap-wx)(维护慢, 还有很大的改善空间).
6-
sqlmap已经移植到了python3.
7-
请不要再使用python2.
4+
support linux, test on Mint 20, kali 2020.4
5+
[sqlmap-wx](https://github.com/needle-wang/sqlmap-wx) on win, which needs to improve.
6+
sqlmap has port to python3.
7+
don' use python2 any more please.
88

9-
#### 截图
9+
#### SCREENSHOT
1010
![screenshot](https://github.com/needle-wang/sqlmap-gtk/blob/master/screenshots/sqlmap-ui1.png)
1111

12-
#### 为什么需要GUI?
13-
选项太多, 容易忘记选项, 含义及使用.
14-
需要经常: sqlmap -hh, sqlmap wiki和google.
15-
视觉上的位置记忆: 滚动+链接跳转的文献, 缺少纸张的阅读痕迹, 也就是位置记忆.
16-
17-
光会选项也没用, wiki上的介绍过于零碎, 选项背后的技术细节很多,
18-
工具描述不够详细, 很多选项有前提要求, 只在特定场景才有效.
19-
20-
这里, 我将选项进行了分类, wiki集成进了GUI, 增加了使用前提, 使用时会有提示,
21-
也许会方便些. 熟练后可以自行注释掉tooltip.
22-
23-
#### 安装与使用
24-
1. **要求**
25-
- python3.6+, GTK+3.20以上(linux已自带)
26-
- pygobject: (二选一)
27-
- `apt-get install python3-gi`(推荐)
12+
#### HOW-TO
13+
1. **pre-request**
14+
- *python3.6+, GTK+3.20 above*(linux has contained)
15+
- pygobject: (choose one)
16+
- `apt-get install python3-gi`(suggestion)
2817
- `pip3 install PyGObject`
2918
- requests: `pip3 install requests`
30-
- 最新的[sqlmap](https://github.com/sqlmapproject/sqlmap): `git clone` it.
31-
2. **下载本GUI**
19+
- lastest [sqlmap](https://github.com/sqlmapproject/sqlmap): `git clone` it.
20+
2. **download**
3221
- `git clone https://github.com/needle-wang/sqlmap-gtk.git`
33-
或 从这下载: [releases](https://github.com/needle-wang/sqlmap-gtk/releases)(不一定最新)
34-
3. **运行**
22+
3. **run**
3523
- `./sqlmap_gtk.py`
3624

37-
#### 功能
38-
- 包含sqlmap(1.3.12.1#dev)所有选项(除了-d, 不定时更新sqlmap选项)
39-
- 支持sqlmapapi客户端(API区)
40-
- 内置终端
41-
- 会话功能, 自动保存和载入上一次的选项
42-
43-
#### 关于
44-
- V0.3.4.3
45-
2021年01月01日 02:18:45
46-
- 使用PyGObject(python3-gi + Gtk+3)重写sqm.py
47-
- 感谢[sqm]<https://github.com/kxcode/gui-for-sqlmap>带来的灵感,
48-
其作者: [KINGX](https://github.com/kxcode)(sqm UI 使用的是python2 + tkinter)
49-
50-
#### 参考文献
51-
- Python GTK+3教程: <https://python-gtk-3-tutorial.readthedocs.io/en/latest/>
25+
#### FUNCTION
26+
- sqlmap(1.3.12.1#dev) all options(except -d)
27+
- sqlmapapi client
28+
- built-in terminal
29+
- session: autosave current options before quit, autoload last used options
30+
- language switch: english, chinese
31+
32+
#### ABOUT
33+
- v0.3.5
34+
2021-01-03 16:56:23
35+
- use PyGObject(python3-gi + Gtk+3) to recode sqm.py
36+
- thanks to the idea from sqm <https://github.com/kxcode/gui-for-sqlmap>
37+
author: [KINGX](https://github.com/kxcode)(sqm UI using python2 + tkinter)
38+
39+
#### REFERENCE
40+
- Python GTK+3 Tutorial: <https://python-gtk-3-tutorial.readthedocs.io/en/latest/>
5241
- PyGObject-GTK 3.0 API: <https://lazka.github.io/pgi-docs/Gtk-3.0/>

css.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* 2019年 05月 17日 星期五 00:11:44 CST */
1+
/* 2019-05-17 00:11:44 */
22

33
checkbutton:checked {
44
background-color: #f6d488;

handler_api.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
#
3-
# 2019年 05月 14日 星期二 22:32:20 CST
3+
# 2019-05-14 22:32:20
44

55
import ast
66
import requests
@@ -19,7 +19,7 @@ def __init__(self, window, m):
1919

2020
def task_new(self, button):
2121
'''
22-
rest api获取自: https://github.com/PyxYuYu/MyBlog/issues/69
22+
rest api from https://github.com/PyxYuYu/MyBlog/issues/69
2323
@get("/task/new") 创建新任务
2424
'''
2525
_host = self.m._page4_api_server_entry.get_text().strip()
@@ -34,7 +34,7 @@ def task_new(self, button):
3434

3535
_resp = _resp.json()
3636
if _resp['success']:
37-
self.task_view_append('%s: 创建成功.' % _resp['taskid'])
37+
self.task_view_append('%s: success.' % _resp['taskid'])
3838
except Exception as e:
3939
self.task_view_append(e)
4040

@@ -63,38 +63,38 @@ def admin_list(self, button):
6363
_a_child.destroy()
6464
# 填充任务列表
6565
_id = 0
66+
_ = self.m.text.gettext
6667
for _taskid, _status in _resp['tasks'].items():
6768
_a_task_row = g.ListBoxRow()
6869
_a_row_box_tmp = g.Box()
6970
_a_task_row.add(_a_row_box_tmp)
7071

71-
_task_del_btn = g.Button.new_with_label('删除')
72+
_task_del_btn = g.Button.new_with_label(_('delete'))
7273
_task_del_btn.connect('clicked', self.task_delete, _a_task_row, _taskid)
73-
_scan_kill_btn = g.Button.new_with_label('杀死')
74+
_scan_kill_btn = g.Button.new_with_label('kill')
7475
_scan_kill_btn.connect('clicked', self.scan_kill, _taskid)
75-
_scan_stop_btn = g.Button.new_with_label('停止')
76+
_scan_stop_btn = g.Button.new_with_label(_('stop'))
7677
_scan_stop_btn.connect('clicked', self.scan_stop, _taskid)
77-
_scan_start_btn = g.Button.new_with_label('启动')
78+
_scan_start_btn = g.Button.new_with_label(_('start'))
7879
_scan_start_btn.connect('clicked', self.scan_start, _taskid)
7980
_scan_data_btn = g.Button.new_with_label('data')
8081
_scan_data_btn.connect('clicked', self.scan_data, _taskid)
8182
_scan_log_btn = g.Button.new_with_label('log')
8283
_scan_log_btn.connect('clicked', self.scan_log, _taskid)
83-
_option_list_btn = g.Button.new_with_label('所有选项')
84+
_option_list_btn = g.Button.new_with_label(_('list'))
8485
_option_list_btn.connect('clicked', self.option_list, _taskid)
85-
_option_get_btn = g.Button.new_with_label('选项:')
86+
_option_get_btn = g.Button.new_with_label(_('option:'))
8687
_option_get_btn.connect('clicked', self.option_get, _taskid)
87-
_option_set_btn = g.Button.new_with_label('设置:')
88+
_option_set_btn = g.Button.new_with_label(_('set:'))
8889
_option_set_btn.connect('clicked', self.option_set, _taskid)
89-
9090
_id += 1
9191
_a_row_box_tmp.pack_start(g.Label.new('%s. %s' % (_id, _taskid)), False, True, 5)
9292
_a_row_box_tmp.pack_start(g.Label.new('(%s)' % _status), False, True, 0)
9393
_a_row_box_tmp.pack_start(_task_del_btn, False, True, 1)
9494
_a_row_box_tmp.pack_start(_scan_kill_btn, False, True, 1)
9595
_a_row_box_tmp.pack_start(_scan_stop_btn, False, True, 1)
9696
_a_row_box_tmp.pack_start(_scan_start_btn, False, True, 1)
97-
_a_row_box_tmp.pack_start(g.Label.new('查看:('), False, True, 1)
97+
_a_row_box_tmp.pack_start(g.Label.new(_('view:(')), False, True, 1)
9898
_a_row_box_tmp.pack_start(_scan_data_btn, False, True, 1)
9999
_a_row_box_tmp.pack_start(_scan_log_btn, False, True, 1)
100100
_a_row_box_tmp.pack_start(_option_list_btn, False, True, 1)
@@ -198,11 +198,11 @@ def option_set(self, button, taskid):
198198

199199
_resp = _resp.json()
200200
if _resp['success']:
201-
_mesg += '设置成功'
201+
_mesg += 'set success.'
202202
except Exception as e:
203203
_mesg += str(e)
204204
else:
205-
_mesg += '需要一个有效的python dict'
205+
_mesg += 'need a valid python dict.'
206206

207207
self.task_view_append(_mesg)
208208

@@ -225,7 +225,7 @@ def admin_flush(self, button):
225225
if _resp['success']:
226226
for _a_child in self.w._api_admin_list_rows.get_children():
227227
self.w._api_admin_list_rows.remove(_a_child)
228-
self.task_view_append('清空全部任务: 成功.')
228+
self.task_view_append(self.m.text.gettext('flush all tasks: Done.'))
229229
except Exception as e:
230230
self.task_view_append(e)
231231

@@ -246,7 +246,7 @@ def task_delete(self, button, *data):
246246
_resp = _resp.json()
247247
if _resp['success']:
248248
self.w._api_admin_list_rows.remove(data[0])
249-
self.task_view_append('%s: 删除成功' % data[1])
249+
self.task_view_append('%s: removed.' % data[1])
250250
except Exception as e:
251251
self.task_view_append(e)
252252

@@ -305,7 +305,7 @@ def scan_stop(self, button, taskid):
305305

306306
def scan_kill(self, button, taskid):
307307
'''
308-
@get("/scan/<taskid>/kill") kill -9 指定任务
308+
@get("/scan/<taskid>/kill") kill -9 <taskid>
309309
'''
310310
_host = self.m._page4_api_server_entry.get_text()
311311
_username = self.m._page4_username_entry.get_text().strip()
@@ -376,7 +376,7 @@ def scan_log(self, button, taskid):
376376
if _logs:
377377
_mesg += _logs.strip()
378378
else:
379-
_mesg += "没有log."
379+
_mesg += "no log."
380380
else:
381381
_mesg += _resp['message']
382382
except Exception as e:

handlers.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
#
3-
# 2018年 08月 29日 星期三 15:34:10 CST
3+
# 2018-08-29 15:34:10
44

55
import time
66
from os import environ, name as OS_NAME
@@ -52,7 +52,7 @@ def run_cmdline(self, button):
5252
if Vte.MAJOR_VERSION >= 0 and Vte.MINOR_VERSION > 52:
5353
self.m._page2_terminal.feed_child_binary(_cmdline_str.encode('utf8'))
5454
else:
55-
# 旧版本的api, len()还要用encode后的长度
55+
# old version Vte's api
5656
self.m._page2_terminal.feed_child(_cmdline_str, len(_cmdline_str.encode('utf8')))
5757
self.m._page2_terminal.grab_focus()
5858

@@ -92,7 +92,7 @@ def set_file_entry_text(self, button, data):
9292
('_Cancel', g.ResponseType.CANCEL,
9393
'_Select', g.ResponseType.OK))
9494
else:
95-
dialog = g.FileChooserDialog("选择文件", self.w,
95+
dialog = g.FileChooserDialog("choose file", self.w,
9696
g.FileChooserAction.OPEN,
9797
('_Cancel', g.ResponseType.CANCEL,
9898
'_OK', g.ResponseType.OK))
@@ -109,7 +109,7 @@ def clear_task_view_buffer(self, button):
109109

110110
def clear_log_view_buffer(self, button):
111111
self.m._page3_log_view.get_buffer().set_text(
112-
'sqlmap的运行记录都放在这: %s\n' % (Path.home() / '.sqlmap/output'))
112+
'sqlmap\'s log folder: %s\n' % (Path.home() / '.sqlmap/output'))
113113

114114
def _get_url_dir(self):
115115
'''
@@ -142,13 +142,13 @@ def _log_view_insert(self, file_path):
142142
for _line_tmp in _line_list_tmp:
143143
_log_view_textbuffer.insert(_end, _line_tmp)
144144
else:
145-
_log_view_textbuffer.insert(_end, '%s: 空文件' % str(file_path))
145+
_log_view_textbuffer.insert(_end, '%s: empty file.' % str(file_path))
146146
except EnvironmentError as e:
147147
_log_view_textbuffer.insert(_end, str(e))
148148
finally:
149149
_log_view_textbuffer.insert(
150150
_end,
151-
time.strftime('\n%Y-%m-%d %R:%S: ----------我是分割线----------\n',
151+
time.strftime('\n%Y-%m-%d %R:%S: ----------split line----------\n',
152152
time.localtime()))
153153

154154
self.m._page3_log_view.grab_focus()
@@ -192,7 +192,6 @@ def _get_target(self):
192192
("-r ", m._request_file.get_text),
193193
("-m ", m._bulkfile.get_text),
194194
("-c ", m._configfile.get_text),
195-
("-x ", m._sitemap_url.get_text),
196195
("-g ", m._google_dork.get_text)]
197196

198197
_target_tmp = _target_list[_current_pagenum][1]().strip()
@@ -619,12 +618,12 @@ def _collect_opts(self):
619618
m._inject_area_no_cast_ckbtn),
620619
self._get_text_only_ckbtn("--no-escape",
621620
m._inject_area_no_escape_ckbtn),
622-
self._get_text_only_ckbtn("--invalid-logic",
623-
m._inject_area_invalid_logic_ckbtn),
621+
self._get_text_only_ckbtn("--invalid-logical",
622+
m._inject_area_invalid_logical_ckbtn),
624623
self._get_text_only_ckbtn("--invalid-bignum",
625624
m._inject_area_invalid_bignum_ckbtn),
626625
self._get_text_only_ckbtn("--invalid-str",
627-
m._inject_area_invalid_str_ckbtn),
626+
m._inject_area_invalid_string_ckbtn),
628627
self._get_text_from_scale("--level=",
629628
m._detection_area_level_ckbtn,
630629
m._detection_area_level_scale),

0 commit comments

Comments
 (0)