Skip to content

Commit ad1266a

Browse files
committed
Minor style updates
1 parent d3d54a9 commit ad1266a

File tree

14 files changed

+25
-38
lines changed

14 files changed

+25
-38
lines changed

data/txt/sha256sums.txt

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ cb43de49a549ae5524f3066b99d6bc3b0b684c6e68c2e75602e87b2ac5718716 extra/shellcod
146146
f3d8033f8c451ae28ca4b8f65cf2ceb77fadba21f11f19229f08398cbf523bc6 extra/shutils/drei.sh
147147
2462efbca0d1572d2e6d380c8be48caa9e6d481b3b42ebe5705de4ba93e6c9fe extra/shutils/duplicates.py
148148
336aebaff9a9a9339c71a03b794ec52429c4024a9ebfd7e5a60c196fad21326e extra/shutils/junk.sh
149-
8779e1a56165327e49bbfd6cb2a461ab18cd8a83e9bfc139c9bdfc8e44f2a23f extra/shutils/modernize.sh
150149
74fe683e94702bef6b8ea8eebb7fc47040e3ef5a03dec756e3cf4504a00c7839 extra/shutils/newlines.py
151150
fed05c468af662ba6ca6885baf8bf85fec1e58f438b3208f3819ad730a75a803 extra/shutils/postcommit-hook.sh
152151
ca86d61d3349ed2d94a6b164d4648cff9701199b5e32378c3f40fca0f517b128 extra/shutils/precommit-hook.sh
@@ -159,13 +158,13 @@ df768bcb9838dc6c46dab9b4a877056cb4742bd6cfaaf438c4a3712c5cc0d264 extra/shutils/
159158
1d6e741e19e467650dce2ca84aa824d6df68ff74aedbe4afa8dbdb0193d94918 extra/vulnserver/__init__.py
160159
9fb22b629ffb69d9643230f7bea50b0ad25836058647a3b2e88a1e254aa3ce74 extra/vulnserver/vulnserver.py
161160
66d14fc303b061ccf983bf3ff84b5e1345c4fe643b662fbc5ec1a924d6415aee lib/controller/action.py
162-
f0a3c3a555920b7e9321c234b54718e3d70f8ca33a8560a389c3b981e98c1585 lib/controller/checks.py
161+
6b6140f5b16625037130383466f92ef8f14a2093794211ffacbb6a8b53ed9929 lib/controller/checks.py
163162
d7b1d29dfa0e4818553259984602410b14c60803cae9c9bb7b249ed7ad71a3f6 lib/controller/controller.py
164163
de2b0220db1c79d8720b636d267b11e117151f5f99740567096e9b4cbb7cc9d5 lib/controller/handler.py
165164
1d6e741e19e467650dce2ca84aa824d6df68ff74aedbe4afa8dbdb0193d94918 lib/controller/__init__.py
166165
9296a1ffc92d839802ac9da4fcfd8e9d3f325f72a65805e774649f435ca5549e lib/core/agent.py
167166
f848dcfdacb5143f803f4e9474cf3eef939039c26c522ca09777c425661300f0 lib/core/bigarray.py
168-
afecad4b14e8008f6f97a6ec653fc930dfd8dc65f9d24a51274f8b5c3f63a4e2 lib/core/common.py
167+
4d0beec02be7492a0fd10757c11de2756eed2ad3272380feb0f2e350e4b4067d lib/core/common.py
169168
88fbbe7c41511b17d7ef449d675a84eaa80cac6ebf457a18577eadd62f6f1330 lib/core/compat.py
170169
5ce8f2292f99d17d69bfc40ded206bfdfd06e2e3660ff9d1b3c56163793f8d1c lib/core/convert.py
171170
f561310b3cea570cc13d9f0aff16cce8b097d51275f8b947e7fff4876ac65c32 lib/core/data.py
@@ -180,17 +179,17 @@ bdd1b5b3eb42cffdc1be78b8fe4e1bb2ec17cd86440a7aeb08fc599205089e94 lib/core/decor
180179
1d6e741e19e467650dce2ca84aa824d6df68ff74aedbe4afa8dbdb0193d94918 lib/core/__init__.py
181180
53499dc202a036289e3b2b9699d19568e794d077e16fd3a5c91771983de45451 lib/core/log.py
182181
79c6b0332efa7cdf752f5caad6bd81a78a0369f2c33c107d9aaeaf52edc7e6e7 lib/core/optiondict.py
183-
2f007b088aad979f75c4d864603dfc685da5be219ae116f2bb0d6445d2db4f83 lib/core/option.py
182+
ade52dd8b09d14b69088409ad1cd39c7d97d5ce8e7eb80546d1a0371ce0043ee lib/core/option.py
184183
81275fdbd463d89a2bfd8c00417a17a872aad74f34c18e44be79c0503e67dfa5 lib/core/patch.py
185184
e79df3790f16f67988e46f94b0a516d7ee725967f7698c8e17f210e4052203a7 lib/core/profiling.py
186185
c6a182f6b7d3b0ad6f0888ea2a4de4148f0770549038d7de8bc3267b4c6635f7 lib/core/readlineng.py
187186
63ae69713c6ea9abfa10e71dfab8f2dcf42432177a38d2c1e98785bf1468674c lib/core/replication.py
188187
5bad5bc7115051cef7b84efa73fbafbf5e1db46eef32a445056b56cda750b66f lib/core/revision.py
189188
0dcb52c9c76a4b0acf2e9038f7d8f08c14543cef3cf7032831c6c0a99376ad24 lib/core/session.py
190-
0a93452bb00bf38464c27f0f65dd1da0f7b718a8af52055193bb180ae45c2c67 lib/core/settings.py
189+
8c697de92344bc70e2facf998d497a734b6ac22804684c17a33d099c8aaee3dd lib/core/settings.py
191190
a1e4f2860bffc73bbf2e5db293fa49dcb600ea35f950cda43dc953b3160ab3db lib/core/shell.py
192191
841716e87b90a3b598515910841f7cf8d33bb87c24a27fba1a80e36a831cbcd7 lib/core/subprocessng.py
193-
9731092f195e346716929323ea3c93247b23b9b92b0f32d3fd0acc3adf9876cc lib/core/target.py
192+
32d0752f1a88c52b049cbe1aedff6e0afb794544ff689f54cb72e159b8d5177c lib/core/target.py
194193
b1071f449a66b4ceacd4b84b33a73d9e0a3197d271d72daaa406ba473a8bb625 lib/core/testing.py
195194
3b47307b044c07389eec05d856403a94c9b8bd0d36aeaab11ef702b33ae499d0 lib/core/threads.py
196195
69b86b483368864639b9d41ff70ab0f2c4a28d4ad66b590f95ccba0566605c69 lib/core/unescaper.py
@@ -210,7 +209,7 @@ cbabdde72df4bd8d6961d589f1721dd938d8f653aa6af8900a31af6e2586405d lib/parse/site
210209
89417568d7f19e48d39a8a9a4227d3d2b71d1c9f61139a41b1835fb5266fcab8 lib/request/basic.py
211210
6139b926a3462d14ddd50acdb8575ae442b8fab089db222721535092b9af3ea1 lib/request/chunkedhandler.py
212211
6be5719f3c922682931779830a4571a13d5612a69e2423fd60a254e8dbceaf5c lib/request/comparison.py
213-
b27dd003eba5ac4697b6a1d5a6712e6aca380436a5a379bd5f2e831d6dca19bd lib/request/connect.py
212+
3a59db656c7000c3e2b554569638a87c167e5c152629c17f0f12eda6c1a06cb2 lib/request/connect.py
214213
0649a39c5cc2fc0f4c062b100ced17e3e6934a7e578247dfc65b650edc29825e lib/request/direct.py
215214
5283754cf387ce4e645ee50834ee387cde29a768aaada1a6a07c338da216c94d lib/request/dns.py
216215
844fae318d6b3141bfc817aac7a29868497b5e7b4b3fdd7c751ad1d4a485324f lib/request/httpshandler.py
@@ -229,7 +228,7 @@ a80176c3bab60af1f45483b1121f2c5a8d0c269eebe0415f78d058302b646aea lib/takeover/r
229228
244ccb3044707e0f2380540b8b2bbaeafa98dc2a0f18619c99a7949375132ffc lib/takeover/udf.py
230229
ec77bee2f221157aff16ec518ca2f3f8359952cd0835f70dd6a5cd8d57caf5bc lib/takeover/web.py
231230
21f2ccd7363b1da8f4f0b1e5050ed2a6806914d2d13e280d7a6635ce127823c3 lib/takeover/xp_cmdshell.py
232-
8a09c54f9020ca170ddc6f41005c8b03533d6f5961a2bb9af02337b8d787fe3e lib/techniques/blind/inference.py
231+
179a8b5b930bfc77490be4e51c2b5677a160c5143187a483c7900536836b40a8 lib/techniques/blind/inference.py
233232
1d6e741e19e467650dce2ca84aa824d6df68ff74aedbe4afa8dbdb0193d94918 lib/techniques/blind/__init__.py
234233
1d6e741e19e467650dce2ca84aa824d6df68ff74aedbe4afa8dbdb0193d94918 lib/techniques/dns/__init__.py
235234
1b8b4fe2088247f99b96ccab078a8bd72dc934d7bd155498eec2a77b67c55daf lib/techniques/dns/test.py
@@ -240,11 +239,11 @@ ec77bee2f221157aff16ec518ca2f3f8359952cd0835f70dd6a5cd8d57caf5bc lib/takeover/w
240239
1d6e741e19e467650dce2ca84aa824d6df68ff74aedbe4afa8dbdb0193d94918 lib/techniques/union/__init__.py
241240
3349573564c035ef7c3dbca7da3aecde139f31621395a1a6a7d2eef1dccbb9b0 lib/techniques/union/test.py
242241
eb564696a2e0c8e8844c1593c77f7bb41e47ce89f213afe93cbba7f1190e91f0 lib/techniques/union/use.py
243-
c09927bccdbdb9714865c9a72d2a739da745375702a935349ddb9edc1d50de70 lib/utils/api.py
242+
05df07c99a37942b0e41abbf77fd1ee874c2ceaa6b4a81bae110560976b3cde6 lib/utils/api.py
244243
1d72a586358c5f6f0b44b48135229742d2e598d40cefbeeabcb40a1c2e0b70b2 lib/utils/brute.py
245244
dd0b67fc2bdf65a4c22a029b056698672a6409eff9a9e55da6250907e8995728 lib/utils/crawler.py
246-
eac125d270256eff54e39736a423dde866bac3b2bb4c76d3cbc32fc53b3bbb99 lib/utils/deps.py
247-
0b83cc8657d5bea117c02facde2b1426c8fe35d9372d996c644d67575d8b755f lib/utils/getch.py
245+
19c267b8d7326dd22d5b23511519fc66c77d3a89b706c2e93b15c5d0ce2815e3 lib/utils/deps.py
246+
d6e8ffaca834424fe8833ef10a9e9cbc20a76217bf5b26895e1e510aac389801 lib/utils/getch.py
248247
c2a2fa68d2c575ab35f472d50b8d52dd6fc5e1b4d6c86a06ac06365650fec321 lib/utils/har.py
249248
e6376fb0c3d001b6be0ef0f23e99a47734cfe3a3d271521dbe6d624d32f19953 lib/utils/hashdb.py
250249
c746c4dcc976137d6e5eff858146dcf29f01637587d3bdb8e2f8a419fc64b885 lib/utils/hash.py
@@ -473,7 +472,7 @@ e55aaf385c5c77963d9aa6ff4aa64a5f23e7c3122b763b02a7c97a6846d8a58f plugins/generi
473472
b3d9d0644197ecb864e899c04ee9c7cd63891ecf2a0d3c333aad563eef735294 plugins/generic/users.py
474473
1d6e741e19e467650dce2ca84aa824d6df68ff74aedbe4afa8dbdb0193d94918 plugins/__init__.py
475474
5a473c60853f54f1a4b14d79b8237f659278fe8a6b42e935ed573bf22b6d5b2c README.md
476-
8c4fd81d84598535643cf0ef1b2d350cd92977cb55287e23993b76eaa2215c30 sqlmapapi.py
475+
ea26a250120cfaac03dd8d9a65dd236afe9ea99978bdaa4c73a0588a27f55291 sqlmapapi.py
477476
168309215af7dd5b0b71070e1770e72f1cbb29a3d8025143fb8aa0b88cd56b62 sqlmapapi.yaml
478477
4121621b1accd6099eed095e9aa48d6db6a4fdfa3bbc5eb569d54c050132cbbf sqlmap.conf
479478
f84846b8493d809d697a75b3d13d904013bbb03e0edd82b724f4753801609057 sqlmap.py
@@ -516,7 +515,7 @@ c390d072ed48431ab5848d51b9ca5c4ff323964a770f0597bdde943ed12377f8 tamper/luangin
516515
b262da8d38dbb4be64d42e0ab07e25611da11c5d07aa11b09497b344a4c76b8d tamper/modsecurityversioned.py
517516
fbb4ea2c764a1402293b71064183a6e929d5278afa09c7799747c53c3d3a9df3 tamper/modsecurityzeroversioned.py
518517
91c7f96f3d0a3da9858e6ebebb337d6e3773961ff8e85af8b9e8458f782e75c0 tamper/multiplespaces.py
519-
e0d800cfefa04fefed744956d4f3c17ccaeb1b59cb7a19c2796da4b1ebff6a3f tamper/ord2ascii.py
518+
f4d87befddbc0474f61aee79a119ca0e77595bf8635a6b715c9d397e65a41a79 tamper/ord2ascii.py
520519
50ebd172e152ed9154ff75acc45b95b3c406be2d2985fe1190bfb2f6a4077763 tamper/overlongutf8more.py
521520
a1e7d8907e7b4b25b1a418e8d5221e909096f719dcb611d15b5e91c83454ccdc tamper/overlongutf8.py
522521
639b9cc83d94f536998b4efed8a88bed6ff8e9c67ea8381e87d1454cdea80293 tamper/percentage.py

extra/shutils/modernize.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

lib/controller/checks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def checkSqlInjection(place, parameter, value):
277277
logger.debug(debugMsg)
278278
continue
279279

280-
elif kb.reduceTests == False:
280+
elif kb.reduceTests is False:
281281
pass
282282

283283
# Skip DBMS-specific test if it does not match the
@@ -529,7 +529,7 @@ def genCmpPayload():
529529
truePage, trueHeaders, trueCode = threadData.lastComparisonPage or "", threadData.lastComparisonHeaders, threadData.lastComparisonCode
530530
trueRawResponse = "%s%s" % (trueHeaders, truePage)
531531

532-
if trueResult and not(truePage == falsePage and not any((kb.nullConnection, conf.code))):
532+
if trueResult and not (truePage == falsePage and not any((kb.nullConnection, conf.code))):
533533
# Perform the test's False request
534534
falseResult = Request.queryPage(genCmpPayload(), place, raise404=False)
535535

lib/core/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5301,7 +5301,7 @@ def _parseWebScarabLog(content):
53015301
logger.warning(warnMsg)
53025302
continue
53035303

5304-
if not(conf.scope and not re.search(conf.scope, url, re.I)):
5304+
if not (conf.scope and not re.search(conf.scope, url, re.I)):
53055305
yield (url, method, None, cookie, tuple())
53065306

53075307
def _parseBurpLog(content):
@@ -5451,7 +5451,7 @@ def _parseBurpLog(content):
54515451
scheme = None
54525452
port = None
54535453

5454-
if not(conf.scope and not re.search(conf.scope, url, re.I)):
5454+
if not (conf.scope and not re.search(conf.scope, url, re.I)):
54555455
yield (url, conf.method or method, data, cookie, tuple(headers))
54565456

54575457
content = readCachedFileContent(reqFile)

lib/core/option.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2699,7 +2699,6 @@ def _basicOptionValidation():
26992699
warnMsg += "option '--retry-on' was provided"
27002700
logger.warning(warnMsg)
27012701

2702-
27032702
if conf.cookieDel and len(conf.cookieDel) != 1:
27042703
errMsg = "option '--cookie-del' should contain a single character (e.g. ';')"
27052704
raise SqlmapSyntaxException(errMsg)

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from thirdparty import six
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.9.5.10"
22+
VERSION = "1.9.5.11"
2323
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2424
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2525
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
@@ -227,7 +227,7 @@ def process(match, repl):
227227
conf.data = getattr(conf.data, UNENCODED_ORIGINAL_VALUE, conf.data)
228228
conf.data = conf.data.replace(kb.customInjectionMark, ASTERISK_MARKER)
229229
conf.data = re.sub(r"(?si)(Content-Disposition:[^\n]+\s+name=\"(?P<name>[^\"]+)\"(?:[^f|^b]|f(?!ilename=)|b(?!oundary=))*?)((%s)--)" % ("\r\n" if "\r\n" in conf.data else '\n'),
230-
functools.partial(process, repl=r"\g<1>%s\g<3>" % kb.customInjectionMark), conf.data)
230+
functools.partial(process, repl=r"\g<1>%s\g<3>" % kb.customInjectionMark), conf.data)
231231

232232
if not kb.postHint:
233233
if kb.customInjectionMark in conf.data: # later processed

lib/request/connect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ class _(dict):
624624
raise SqlmapMissingDependence("outdated version of httpx detected (%s<%s)" % (httpx.__version__, MIN_HTTPX_VERSION))
625625

626626
try:
627-
proxy_mounts = dict(("%s://" % key, httpx.HTTPTransport(proxy="%s%s" % ("http://" if not "://" in kb.proxies[key] else "", kb.proxies[key]))) for key in kb.proxies) if kb.proxies else None
627+
proxy_mounts = dict(("%s://" % key, httpx.HTTPTransport(proxy="%s%s" % ("http://" if "://" not in kb.proxies[key] else "", kb.proxies[key]))) for key in kb.proxies) if kb.proxies else None
628628
with httpx.Client(verify=False, http2=True, timeout=timeout, follow_redirects=True, cookies=conf.cj, mounts=proxy_mounts) as client:
629629
conn = client.request(method or (HTTPMETHOD.POST if post is not None else HTTPMETHOD.GET), url, headers=headers, data=post)
630630
except (httpx.HTTPError, httpx.InvalidURL, httpx.CookieConflict, httpx.StreamError) as ex:

lib/techniques/blind/inference.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ def blindThread():
511511
currentCharIndex = threadData.shared.index[0]
512512

513513
if kb.threadContinue:
514-
val = getChar(currentCharIndex, asciiTbl, not(charsetType is None and conf.charset))
514+
val = getChar(currentCharIndex, asciiTbl, not (charsetType is None and conf.charset))
515515
if val is None:
516516
val = INFERENCE_UNKNOWN_CHAR
517517
else:
@@ -657,7 +657,7 @@ def blindThread():
657657
if not val:
658658
val = getChar(index, otherCharset, otherCharset == asciiTbl)
659659
else:
660-
val = getChar(index, asciiTbl, not(charsetType is None and conf.charset))
660+
val = getChar(index, asciiTbl, not (charsetType is None and conf.charset))
661661

662662
if val is None:
663663
finalValue = partialValue

lib/utils/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ def client(host=RESTAPI_DEFAULT_ADDRESS, port=RESTAPI_DEFAULT_PORT, username=Non
787787
return
788788

789789
commands = ("help", "new", "use", "data", "log", "status", "option", "stop", "kill", "list", "flush", "version", "exit", "bye", "quit")
790-
colors = ('red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'lightgrey', 'lightred', 'lightgreen', 'lightyellow', 'lightblue', 'lightmagenta', 'lightcyan')
790+
colors = ('red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'lightgrey', 'lightred', 'lightgreen', 'lightyellow', 'lightblue', 'lightmagenta', 'lightcyan')
791791
autoCompletion(AUTOCOMPLETE_TYPE.API, commands=commands)
792792

793793
taskid = None

lib/utils/deps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def checkDependencies():
5959
elif dbmsName == DBMS.CUBRID:
6060
__import__("CUBRIDdb")
6161
elif dbmsName == DBMS.CLICKHOUSE:
62-
__import__("clickhouse_connect")
62+
__import__("clickhouse_connect")
6363
except:
6464
warnMsg = "sqlmap requires '%s' third-party library " % data[1]
6565
warnMsg += "in order to directly connect to the DBMS "

lib/utils/getch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def __init__(self):
1616
except ImportError:
1717
try:
1818
self.impl = _GetchMacCarbon()
19-
except(AttributeError, ImportError):
19+
except (AttributeError, ImportError):
2020
self.impl = _GetchUnix()
2121

2222
def __call__(self):

sqlmapapi.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ def main():
105105
apiparser.add_argument("--password", help="Basic authentication password (optional)")
106106
(args, _) = apiparser.parse_known_args() if hasattr(apiparser, "parse_known_args") else apiparser.parse_args()
107107

108-
109108
# Start the client or the server
110109
if args.server:
111110
server(args.host, args.port, adapter=args.adapter, username=args.username, password=args.password, database=args.database)

tamper/ord2ascii.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@ def dependencies():
1616

1717
def tamper(payload, **kwargs):
1818
"""
19-
Replaces ORD() occurences with equivalent ASCII() calls
20-
19+
Replaces ORD() occurences with equivalent ASCII() calls
2120
Requirement:
2221
* MySQL
23-
2422
>>> tamper("ORD('42')")
2523
"ASCII('42')"
2624
"""

0 commit comments

Comments
 (0)