@@ -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
0 commit comments