Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
needle-wang committed Dec 28, 2020
1 parent a34266d commit 465f9df
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 26 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ sqlmap已经移植到了python3!

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

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

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

#### 参考文献
1. Gtk+3教程: https://python-gtk-3-tutorial.readthedocs.io/en/latest/
2. Gtk+3 API: https://lazka.github.io/pgi-docs/Gtk-3.0/
- Python GTK+3教程: https://python-gtk-3-tutorial.readthedocs.io/en/latest/
- PyGObject API: https://lazka.github.io/pgi-docs/Gtk-3.0/
33 changes: 19 additions & 14 deletions sqlmap_gtk.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def _build_page1(self):

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

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

_subprocess.wait()
_subprocess.stdout.close()
except FileNotFoundError as e:
GLib.idle_add(self.textbuffer_insert, textbuffer, str(e))
except Exception as e:
Expand All @@ -515,18 +514,24 @@ def textbuffer_insert(self, textbuffer, line):
def _build_page6(self):
box = Box()

_about_str = '''
1. VERSION: 0.3.4.2
_url_self = 'https://github.com/needle-wang/sqlmap-gtk'
_url_tutorial = 'https://python-gtk-3-tutorial.readthedocs.io/en/latest'
_url_api = 'https://lazka.github.io/pgi-docs/Gtk-3.0/'
_url_idea = 'https://github.com/kxcode'
_about_str = f'''
1. <a href="{_url_self}" title = "{_url_self}">本项目首页</a> VERSION: 0.3.4.2
2019年10月10日 08:06:05
required: python3.5+, python3-gi, sqlmap
作者: needle wang ( [email protected] )
https://github.com/needle-wang/sqlmap-gtk\n
2. 使用PyGObject(Gtk+3: python3-gi)重写sqm.py\n
3. Gtk+3教程: https://python-gtk-3-tutorial.readthedocs.io/en/latest\n
4. Gtk+3 API: https://lazka.github.io/pgi-docs/Gtk-3.0/\n\n
5. 感谢sqm带来的灵感, 其作者: KINGX ( https://github.com/kxcode ), sqm UI 使用的是python2 + tkinter
required: python3.6+, gtk+3.20+,
python3-gi, requests, sqlmap\n
2. 使用PyGObject(Gtk+3: python3-gi)重写sqm.py
3. 感谢sqm带来的灵感, 其作者: <a href="{_url_idea}" title="{_url_idea}">KINGX</a>, sqm UI 使用的是python2 + tkinter\n
4. Python GTK+3教程: <a href="{_url_tutorial}">{_url_tutorial}</a>
5. PyGObject API: <a href="{_url_api}">{_url_api}</a>
'''
box.pack_start(label.new(_about_str), True, False, 0)
_ = label.new('')
_.set_markup(_about_str)
# _.set_selectable(True)
box.pack_start(_, True, False, 0)
return box


Expand All @@ -550,7 +555,7 @@ def main():
win.show_all()
# --------
end = time.process_time()
print('loading cost: %s Seconds' % (end - start))
print('loading cost: %.3f Seconds' % (end - start))
g.main()


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

0 comments on commit 465f9df

Please sign in to comment.