Skip to content

Commit 465f9df

Browse files
committed
update
1 parent a34266d commit 465f9df

File tree

3 files changed

+31
-26
lines changed

3 files changed

+31
-26
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ sqlmap已经移植到了python3!
3030

3131
#### 安装与使用
3232
1. **要求**
33-
- python3.5+, GTK+3.20
33+
- python3.6+, GTK+3.20
3434
- pygobject: `pip3 install PyGObject` or `apt-get install python3-gi`
3535
- requests: `pip3 install requests`
3636
- 最新的[sqlmap](https://github.com/sqlmapproject/sqlmap): `git clone` it.
@@ -41,18 +41,18 @@ sqlmap已经移植到了python3!
4141
- `./sqlmap_gtk.py`
4242

4343
#### 功能
44-
1. 包含sqlmap(1.3.12.1#dev)所有选项(除了-d, 不定时更新sqlmap选项)
45-
2. 支持sqlmapapi客户端(API区)
46-
3. 内置终端
47-
4. 会话功能, 自动保存和载入上一次的选项
44+
- 包含sqlmap(1.3.12.1#dev)所有选项(除了-d, 不定时更新sqlmap选项)
45+
- 支持sqlmapapi客户端(API区)
46+
- 内置终端
47+
- 会话功能, 自动保存和载入上一次的选项
4848

4949
#### 关于
50-
1. V0.3.4.2
50+
- V0.3.4.2
5151
2019年10月10日 08:06:05
52-
作者: needle wang ( needlewang2011@gmail.com )
53-
2. 使用PyGObject(Gtk+3: python3-gi)重写sqm.py
54-
3. 感谢[sqm](https://github.com/kxcode/gui-for-sqlmap)带来的灵感, 其作者: [KINGX](https://github.com/kxcode) (sqm UI 使用的是python2 + tkinter)
52+
作者: needle wang
53+
- 使用PyGObject(Gtk+3 + python3-gi)重写sqm.py
54+
- 感谢[sqm](https://github.com/kxcode/gui-for-sqlmap)带来的灵感, 其作者: [KINGX](https://github.com/kxcode) (sqm UI 使用的是python2 + tkinter)
5555

5656
#### 参考文献
57-
1. Gtk+3教程: https://python-gtk-3-tutorial.readthedocs.io/en/latest/
58-
2. Gtk+3 API: https://lazka.github.io/pgi-docs/Gtk-3.0/
57+
- Python GTK+3教程: https://python-gtk-3-tutorial.readthedocs.io/en/latest/
58+
- PyGObject API: https://lazka.github.io/pgi-docs/Gtk-3.0/

sqlmap_gtk.py

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def _build_page1(self):
281281

282282
def _build_page2(self):
283283
'''
284-
用subprocess不可实现与sqlap的交互!
284+
用subprocess不可实现与sqlmap的交互!
285285
不管是多线程, 同步还是异步, 都不行, 只能使用pty
286286
'''
287287
box = Box(orientation=VERTICAL, spacing=6)
@@ -489,15 +489,14 @@ def _set_manual_view(self, textbuffer, isClick):
489489
# _manual_hh = '/home/needle/bin/output_interval.sh'
490490
_manual_hh = [self._handlers.get_sqlmap_path(), '-hh']
491491
try:
492-
_subprocess = Popen(_manual_hh, stdout=PIPE, stderr=STDOUT, bufsize=1)
492+
_subprocess = Popen(_manual_hh, stdout=PIPE, stderr=STDOUT)
493493

494494
for _an_bytes_line_tmp in iter(_subprocess.stdout.readline, b''):
495495
GLib.idle_add(self.textbuffer_insert,
496496
textbuffer,
497497
_an_bytes_line_tmp.decode('utf8'))
498498

499499
_subprocess.wait()
500-
_subprocess.stdout.close()
501500
except FileNotFoundError as e:
502501
GLib.idle_add(self.textbuffer_insert, textbuffer, str(e))
503502
except Exception as e:
@@ -515,18 +514,24 @@ def textbuffer_insert(self, textbuffer, line):
515514
def _build_page6(self):
516515
box = Box()
517516

518-
_about_str = '''
519-
1. VERSION: 0.3.4.2
517+
_url_self = 'https://github.com/needle-wang/sqlmap-gtk'
518+
_url_tutorial = 'https://python-gtk-3-tutorial.readthedocs.io/en/latest'
519+
_url_api = 'https://lazka.github.io/pgi-docs/Gtk-3.0/'
520+
_url_idea = 'https://github.com/kxcode'
521+
_about_str = f'''
522+
1. <a href="{_url_self}" title = "{_url_self}">本项目首页</a> VERSION: 0.3.4.2
520523
2019年10月10日 08:06:05
521-
required: python3.5+, python3-gi, sqlmap
522-
作者: needle wang ( needlewang2011@gmail.com )
523-
https://github.com/needle-wang/sqlmap-gtk\n
524-
2. 使用PyGObject(Gtk+3: python3-gi)重写sqm.py\n
525-
3. Gtk+3教程: https://python-gtk-3-tutorial.readthedocs.io/en/latest\n
526-
4. Gtk+3 API: https://lazka.github.io/pgi-docs/Gtk-3.0/\n\n
527-
5. 感谢sqm带来的灵感, 其作者: KINGX ( https://github.com/kxcode ), sqm UI 使用的是python2 + tkinter
524+
required: python3.6+, gtk+3.20+,
525+
python3-gi, requests, sqlmap\n
526+
2. 使用PyGObject(Gtk+3: python3-gi)重写sqm.py
527+
3. 感谢sqm带来的灵感, 其作者: <a href="{_url_idea}" title="{_url_idea}">KINGX</a>, sqm UI 使用的是python2 + tkinter\n
528+
4. Python GTK+3教程: <a href="{_url_tutorial}">{_url_tutorial}</a>
529+
5. PyGObject API: <a href="{_url_api}">{_url_api}</a>
528530
'''
529-
box.pack_start(label.new(_about_str), True, False, 0)
531+
_ = label.new('')
532+
_.set_markup(_about_str)
533+
# _.set_selectable(True)
534+
box.pack_start(_, True, False, 0)
530535
return box
531536

532537

@@ -550,7 +555,7 @@ def main():
550555
win.show_all()
551556
# --------
552557
end = time.process_time()
553-
print('loading cost: %s Seconds' % (end - start))
558+
print('loading cost: %.3f Seconds' % (end - start))
554559
g.main()
555560

556561

tooltips.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ def set_all_tooltips(self, m):
753753
7. 点击 启动 (设置了选项才有意义)
754754
注: 1.要查看任务的状态, 点击 显示任务 进行刷新
755755
2.sqlmapapi支持的选项与sqlmap不兼容,
756-
且其进行选项设置时, 没有检查选项!
756+
且其进行选项设置时, 不会检查选项!
757757
如果设置了无效的选项, 只能删除任务!
758758
'''
759759
self._set_tooltip(_api_usage,

0 commit comments

Comments
 (0)