Skip to content

Commit a42ec7d

Browse files
committed
Trivial refactoring
1 parent b3f4c6d commit a42ec7d

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.4.8.9"
21+
VERSION = "1.4.8.10"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/core/target.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def _setRequestParams():
111111
def process(match, repl):
112112
retVal = match.group(0)
113113

114-
if not (conf.testParameter and match.group("name") not in [removePostHintPrefix(_) for _ in conf.testParameter]) and match.group("name") == match.group("name").strip('\\'):
114+
if not (conf.testParameter and match.group("name") not in (removePostHintPrefix(_) for _ in conf.testParameter)) and match.group("name") == match.group("name").strip('\\'):
115115
retVal = repl
116116
while True:
117117
_ = re.search(r"\\g<([^>]+)>", retVal)

lib/request/connect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,7 @@ def _adjustParameter(paramString, parameter, newValue):
11311131
uri = _adjustParameter(uri, token.name, token.value)
11321132
elif candidate == PLACE.GET and get:
11331133
get = _adjustParameter(get, token.name, token.value)
1134-
elif candidate in [PLACE.POST, PLACE.CUSTOM_POST] and post:
1134+
elif candidate in (PLACE.POST, PLACE.CUSTOM_POST) and post:
11351135
post = _adjustParameter(post, token.name, token.value)
11361136

11371137
for i in xrange(len(conf.httpHeaders)):

lib/request/httpshandler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def create_sock():
5858
# Reference(s): https://docs.python.org/2/library/ssl.html#ssl.SSLContext
5959
# https://www.mnot.net/blog/2014/12/27/python_2_and_tls_sni
6060
if re.search(r"\A[\d.]+\Z", self.host) is None and kb.tlsSNI.get(self.host) is not False and hasattr(ssl, "SSLContext"):
61-
for protocol in [_ for _ in _protocols if _ >= ssl.PROTOCOL_TLSv1]:
61+
for protocol in (_ for _ in _protocols if _ >= ssl.PROTOCOL_TLSv1):
6262
try:
6363
sock = create_sock()
6464
if protocol not in _contexts:

0 commit comments

Comments
 (0)