mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 02:53:46 +03:00
Trivial updates
This commit is contained in:
parent
38d5086b88
commit
1a95cea1f2
|
@ -65,7 +65,7 @@ def runGui(parser):
|
||||||
_tkinter_ttk.Notebook.__init__(self, master, **kw)
|
_tkinter_ttk.Notebook.__init__(self, master, **kw)
|
||||||
self.bind("<<NotebookTabChanged>>", self._on_tab_changed)
|
self.bind("<<NotebookTabChanged>>", self._on_tab_changed)
|
||||||
|
|
||||||
def _on_tab_changed(self,event):
|
def _on_tab_changed(self, event):
|
||||||
event.widget.update_idletasks()
|
event.widget.update_idletasks()
|
||||||
|
|
||||||
tab = event.widget.nametowidget(event.widget.select())
|
tab = event.widget.nametowidget(event.widget.select())
|
||||||
|
@ -76,7 +76,7 @@ def runGui(parser):
|
||||||
|
|
||||||
# Reference: https://www.holadevs.com/pregunta/64750/change-selected-tab-color-in-ttknotebook
|
# Reference: https://www.holadevs.com/pregunta/64750/change-selected-tab-color-in-ttknotebook
|
||||||
style = _tkinter_ttk.Style()
|
style = _tkinter_ttk.Style()
|
||||||
settings = {"TNotebook.Tab": {"configure": {"padding": [5, 1], "background": "#fdd57e" }, "map": {"background": [("selected", "#C70039"), ("active", "#fc9292")], "foreground": [("selected", "#ffffff"), ("active", "#000000")]}}}
|
settings = {"TNotebook.Tab": {"configure": {"padding": [5, 1], "background": "#fdd57e"}, "map": {"background": [("selected", "#C70039"), ("active", "#fc9292")], "foreground": [("selected", "#ffffff"), ("active", "#000000")]}}}
|
||||||
style.theme_create("custom", parent="alt", settings=settings)
|
style.theme_create("custom", parent="alt", settings=settings)
|
||||||
style.theme_use("custom")
|
style.theme_use("custom")
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ def runGui(parser):
|
||||||
while alive:
|
while alive:
|
||||||
line = ""
|
line = ""
|
||||||
try:
|
try:
|
||||||
#line = queue.get_nowait()
|
# line = queue.get_nowait()
|
||||||
line = queue.get(timeout=.1)
|
line = queue.get(timeout=.1)
|
||||||
text.insert(_tkinter.END, line)
|
text.insert(_tkinter.END, line)
|
||||||
except _queue.Empty:
|
except _queue.Empty:
|
||||||
|
|
|
@ -27,7 +27,7 @@ def profile(profileOutputFile=None, dotOutputFile=None, imageOutputFile=None):
|
||||||
import pydot
|
import pydot
|
||||||
except ImportError as ex:
|
except ImportError as ex:
|
||||||
errMsg = "profiling requires third-party libraries ('%s') " % getSafeExString(ex)
|
errMsg = "profiling requires third-party libraries ('%s') " % getSafeExString(ex)
|
||||||
errMsg += "(Hint: 'sudo apt-get install python-pydot python-pyparsing python-profiler graphviz')"
|
errMsg += "(Hint: 'sudo apt install python-pydot python-pyparsing python-profiler graphviz')"
|
||||||
logger.error(errMsg)
|
logger.error(errMsg)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
@ -84,7 +84,7 @@ def profile(profileOutputFile=None, dotOutputFile=None, imageOutputFile=None):
|
||||||
pydotGraph.write_png(imageOutputFile)
|
pydotGraph.write_png(imageOutputFile)
|
||||||
except OSError:
|
except OSError:
|
||||||
errMsg = "profiling requires graphviz installed "
|
errMsg = "profiling requires graphviz installed "
|
||||||
errMsg += "(Hint: 'sudo apt-get install graphviz')"
|
errMsg += "(Hint: 'sudo apt install graphviz')"
|
||||||
logger.error(errMsg)
|
logger.error(errMsg)
|
||||||
else:
|
else:
|
||||||
infoMsg = "displaying interactive graph with xdot library"
|
infoMsg = "displaying interactive graph with xdot library"
|
||||||
|
|
|
@ -136,6 +136,6 @@ def update():
|
||||||
infoMsg += "https://github.com/sqlmapproject/sqlmap/downloads"
|
infoMsg += "https://github.com/sqlmapproject/sqlmap/downloads"
|
||||||
else:
|
else:
|
||||||
infoMsg = "for Linux platform it's recommended "
|
infoMsg = "for Linux platform it's recommended "
|
||||||
infoMsg += "to install a standard 'git' package (e.g.: 'sudo apt-get install git')"
|
infoMsg += "to install a standard 'git' package (e.g.: 'sudo apt install git')"
|
||||||
|
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
|
@ -705,7 +705,7 @@ def server(host=RESTAPI_DEFAULT_ADDRESS, port=RESTAPI_DEFAULT_PORT, adapter=REST
|
||||||
errMsg += "List of supported adapters: %s" % ', '.join(sorted(list(server_names.keys())))
|
errMsg += "List of supported adapters: %s" % ', '.join(sorted(list(server_names.keys())))
|
||||||
else:
|
else:
|
||||||
errMsg = "Server support for adapter '%s' is not installed on this system " % adapter
|
errMsg = "Server support for adapter '%s' is not installed on this system " % adapter
|
||||||
errMsg += "(Note: you can try to install it with 'sudo apt-get install python-%s' or 'sudo pip install %s')" % (adapter, adapter)
|
errMsg += "(Note: you can try to install it with 'sudo apt install python-%s' or 'sudo pip install %s')" % (adapter, adapter)
|
||||||
logger.critical(errMsg)
|
logger.critical(errMsg)
|
||||||
|
|
||||||
def _client(url, options=None):
|
def _client(url, options=None):
|
||||||
|
|
|
@ -163,7 +163,7 @@ def tableExists(tableFile, regex=None):
|
||||||
if not threadData.shared.files:
|
if not threadData.shared.files:
|
||||||
warnMsg = "no table(s) found"
|
warnMsg = "no table(s) found"
|
||||||
if conf.db:
|
if conf.db:
|
||||||
warnMsg += " for database '%s'" % conf.db
|
warnMsg += " for database '%s'" % conf.db
|
||||||
logger.warn(warnMsg)
|
logger.warn(warnMsg)
|
||||||
else:
|
else:
|
||||||
for item in threadData.shared.files:
|
for item in threadData.shared.files:
|
||||||
|
|
4
thirdparty/keepalive/keepalive.py
vendored
4
thirdparty/keepalive/keepalive.py
vendored
|
@ -107,9 +107,11 @@ from __future__ import print_function
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from thirdparty.six.moves import http_client as _http_client
|
from thirdparty.six.moves import http_client as _http_client
|
||||||
|
from thirdparty.six.moves import range as _range
|
||||||
from thirdparty.six.moves import urllib as _urllib
|
from thirdparty.six.moves import urllib as _urllib
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from six.moves import http_client as _http_client
|
from six.moves import http_client as _http_client
|
||||||
|
from six.moves import range as _range
|
||||||
from six.moves import urllib as _urllib
|
from six.moves import urllib as _urllib
|
||||||
|
|
||||||
import socket
|
import socket
|
||||||
|
@ -569,7 +571,7 @@ def fetch(N, url, delay=0):
|
||||||
import time
|
import time
|
||||||
lens = []
|
lens = []
|
||||||
starttime = time.time()
|
starttime = time.time()
|
||||||
for i in range(N):
|
for i in _range(N):
|
||||||
if delay and i > 0: time.sleep(delay)
|
if delay and i > 0: time.sleep(delay)
|
||||||
fo = _urllib.request.urlopen(url)
|
fo = _urllib.request.urlopen(url)
|
||||||
foo = fo.read()
|
foo = fo.read()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user