Skip to content

Commit 1a95cea

Browse files
committed
Trivial updates
1 parent 38d5086 commit 1a95cea

File tree

6 files changed

+11
-9
lines changed

6 files changed

+11
-9
lines changed

lib/core/gui.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def __init__(self, master=None, **kw):
6565
_tkinter_ttk.Notebook.__init__(self, master, **kw)
6666
self.bind("<<NotebookTabChanged>>", self._on_tab_changed)
6767

68-
def _on_tab_changed(self,event):
68+
def _on_tab_changed(self, event):
6969
event.widget.update_idletasks()
7070

7171
tab = event.widget.nametowidget(event.widget.select())
@@ -76,7 +76,7 @@ def _on_tab_changed(self,event):
7676

7777
# Reference: https://www.holadevs.com/pregunta/64750/change-selected-tab-color-in-ttknotebook
7878
style = _tkinter_ttk.Style()
79-
settings = {"TNotebook.Tab": {"configure": {"padding": [5, 1], "background": "#fdd57e" }, "map": {"background": [("selected", "#C70039"), ("active", "#fc9292")], "foreground": [("selected", "#ffffff"), ("active", "#000000")]}}}
79+
settings = {"TNotebook.Tab": {"configure": {"padding": [5, 1], "background": "#fdd57e"}, "map": {"background": [("selected", "#C70039"), ("active", "#fc9292")], "foreground": [("selected", "#ffffff"), ("active", "#000000")]}}}
8080
style.theme_create("custom", parent="alt", settings=settings)
8181
style.theme_use("custom")
8282

@@ -189,7 +189,7 @@ def enqueue(stream, queue):
189189
while alive:
190190
line = ""
191191
try:
192-
#line = queue.get_nowait()
192+
# line = queue.get_nowait()
193193
line = queue.get(timeout=.1)
194194
text.insert(_tkinter.END, line)
195195
except _queue.Empty:

lib/core/profiling.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def profile(profileOutputFile=None, dotOutputFile=None, imageOutputFile=None):
2727
import pydot
2828
except ImportError as ex:
2929
errMsg = "profiling requires third-party libraries ('%s') " % getSafeExString(ex)
30-
errMsg += "(Hint: 'sudo apt-get install python-pydot python-pyparsing python-profiler graphviz')"
30+
errMsg += "(Hint: 'sudo apt install python-pydot python-pyparsing python-profiler graphviz')"
3131
logger.error(errMsg)
3232

3333
return
@@ -84,7 +84,7 @@ def profile(profileOutputFile=None, dotOutputFile=None, imageOutputFile=None):
8484
pydotGraph.write_png(imageOutputFile)
8585
except OSError:
8686
errMsg = "profiling requires graphviz installed "
87-
errMsg += "(Hint: 'sudo apt-get install graphviz')"
87+
errMsg += "(Hint: 'sudo apt install graphviz')"
8888
logger.error(errMsg)
8989
else:
9090
infoMsg = "displaying interactive graph with xdot library"

lib/core/update.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,6 @@ def update():
136136
infoMsg += "https://github.com/sqlmapproject/sqlmap/downloads"
137137
else:
138138
infoMsg = "for Linux platform it's recommended "
139-
infoMsg += "to install a standard 'git' package (e.g.: 'sudo apt-get install git')"
139+
infoMsg += "to install a standard 'git' package (e.g.: 'sudo apt install git')"
140140

141141
logger.info(infoMsg)

lib/utils/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ def server(host=RESTAPI_DEFAULT_ADDRESS, port=RESTAPI_DEFAULT_PORT, adapter=REST
705705
errMsg += "List of supported adapters: %s" % ', '.join(sorted(list(server_names.keys())))
706706
else:
707707
errMsg = "Server support for adapter '%s' is not installed on this system " % adapter
708-
errMsg += "(Note: you can try to install it with 'sudo apt-get install python-%s' or 'sudo pip install %s')" % (adapter, adapter)
708+
errMsg += "(Note: you can try to install it with 'sudo apt install python-%s' or 'sudo pip install %s')" % (adapter, adapter)
709709
logger.critical(errMsg)
710710

711711
def _client(url, options=None):

lib/utils/brute.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def tableExistsThread():
163163
if not threadData.shared.files:
164164
warnMsg = "no table(s) found"
165165
if conf.db:
166-
warnMsg += " for database '%s'" % conf.db
166+
warnMsg += " for database '%s'" % conf.db
167167
logger.warn(warnMsg)
168168
else:
169169
for item in threadData.shared.files:

thirdparty/keepalive/keepalive.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,11 @@
107107

108108
try:
109109
from thirdparty.six.moves import http_client as _http_client
110+
from thirdparty.six.moves import range as _range
110111
from thirdparty.six.moves import urllib as _urllib
111112
except ImportError:
112113
from six.moves import http_client as _http_client
114+
from six.moves import range as _range
113115
from six.moves import urllib as _urllib
114116

115117
import socket
@@ -569,7 +571,7 @@ def fetch(N, url, delay=0):
569571
import time
570572
lens = []
571573
starttime = time.time()
572-
for i in range(N):
574+
for i in _range(N):
573575
if delay and i > 0: time.sleep(delay)
574576
fo = _urllib.request.urlopen(url)
575577
foo = fo.read()

0 commit comments

Comments
 (0)