Skip to content

Commit

Permalink
替换filebutton优化启动速度;bug修复:输出滚动,file entry补全;G_VALUE_HOLDS_INT警告
Browse files Browse the repository at this point in the history
  • Loading branch information
needle-wang committed Apr 30, 2019
1 parent f0c1b36 commit 717c41a
Show file tree
Hide file tree
Showing 6 changed files with 153 additions and 136 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,21 @@ sqlmap ui, using PyGObject(gtk+3)
- ~~UI重新排版~~
- ~~分离并完善tooltip等提示信息~~
- ~~细节优化(margin, padding啥的)~~
- 打从加了filechooserbutton起, 启动就慢了一倍:
根据line_profiler输出: gtk.FileChooserButton()有性能问题!
- ~~打从加了filechooserbutton起, 启动就慢了一倍:
根据line_profiler输出: gtk.FileChooserButton()有性能问题!~~
- ~~重构~~
- ~~添加session功能(v0.2.2)~~
- ~~重构成MVC模式(结构重构改动很大, v0.3)~~
- ~~将管道流集成到UI里(无法实现, 改用pty实现成功)~~
- ~~添加API区(实现sqlmapapi client)~~
- ~~添加API区(实现sqlmapapi client)~~
- ~~修复: 修改filechooserbutton(常有什么network path超时警告, 启动加快),
输出滚动不准确, file entry补全, G_VALUE_HOLDS_INT警告~~
- 继续重构, 优化

#### ABOUT
1. V0.3.2
1. update at 2019-05-01 02:36:25
V0.3.2
2019年 04月 29日 星期一 21:20:07 CST
V0.3.1
2019年 04月 25日 星期四 17:36:44 CST
作者: 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)
Expand Down
8 changes: 3 additions & 5 deletions handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,11 @@ def _task_view_append(self, output):

_task_view_textbuffer.insert(_end, '%s\n' % output)

self.m._page4_task_view.scroll_mark_onscreen(_mark)
# 获取焦点
# self.w.set_focus(self.m._page4_task_view)
self.m._page4_task_view.grab_focus()
# https://stackoverflow.com/questions/48934458/gtk-sourceview-scroll-to-mark-not-working
GLib.idle_add(self.m._page4_task_view.scroll_mark_onscreen, _mark)

def run_cmdline(self, button):
'''
Expand Down Expand Up @@ -403,9 +404,6 @@ def run_cmdline_old(self, button):
# print(_cmdline_str)
Popen(_cmdline_str, shell = True)

def set_file_entry_text(self, button, entry):
entry.set_text(button.get_filename())

def clear_log_view_buffer(self, button):
_log_view_textbuffer = self.w._log_view.get_buffer()
_log_view_textbuffer.set_text(''.join(
Expand Down Expand Up @@ -471,8 +469,8 @@ def _log_view_insert(self, file_path):
time.strftime('\n%Y-%m-%d %R:%S: ----------我是分割线----------\n',
time.localtime()))

self.w._log_view.scroll_mark_onscreen(_mark)
self.w._log_view.grab_focus()
GLib.idle_add(self.w._log_view.scroll_mark_onscreen, _mark)

def read_log_file(self, button):
_base_dir = self._get_url_dir()
Expand Down
Empty file modified profiler.sh
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions session.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def _load_from_tmp_entry(self):
_tmp_entry = getattr(self.m, _i)

if isinstance(_tmp_entry, g.Entry) and self._cfg['Entry'][_i]:
# print(type(self._cfg['Entry'][_i]))
_tmp_entry.set_text(self._cfg['Entry'][_i])

def _load_from_tmp_ckbtn(self):
Expand Down
Loading

0 comments on commit 717c41a

Please sign in to comment.