Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8ca3287

Browse files
committed
Proper way to skip already used payloads (important to --suffix/--prefix cases)
1 parent 60767de commit 8ca3287

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

lib/controller/checks.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,11 +454,13 @@ def checkSqlInjection(place, parameter, value):
454454
boundPayload = agent.prefixQuery(fstPayload, prefix, where, clause)
455455
boundPayload = agent.suffixQuery(boundPayload, comment, suffix, where)
456456
reqPayload = agent.payload(place, parameter, newValue=boundPayload, where=where)
457+
457458
if reqPayload:
458-
if reqPayload in seenPayload:
459+
stripPayload = re.sub(r"(\A|\b|_)([A-Za-z]{4}((?<!LIKE))|\d+)(_|\b|\Z)", r"\g<1>.\g<4>", reqPayload)
460+
if stripPayload in seenPayload:
459461
continue
460462
else:
461-
seenPayload.add(reqPayload)
463+
seenPayload.add(stripPayload)
462464
else:
463465
reqPayload = None
464466

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.enums import OS
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.2.4.16"
22+
VERSION = "1.2.4.17"
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)

txt/checksum.md5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ c88d66597f4aab719bde4542b0a1a6e0 extra/shutils/regressiontest.py
2121
1e5532ede194ac9c083891c2f02bca93 extra/sqlharvest/__init__.py
2222
b3e60ea4e18a65c48515d04aab28ff68 extra/sqlharvest/sqlharvest.py
2323
0f581182871148b0456a691ae85b04c0 lib/controller/action.py
24-
56d325f83671146c28ac300ff553420f lib/controller/checks.py
24+
d9559f6c5053a7ccb524f3dd049e35f8 lib/controller/checks.py
2525
c414cecdb0472c92cf50ed5b01e4438c lib/controller/controller.py
2626
c7443613a0a2505b1faec931cee2a6ef lib/controller/handler.py
2727
1e5532ede194ac9c083891c2f02bca93 lib/controller/__init__.py
@@ -46,7 +46,7 @@ c9a56e58984420a5abb7a3f7aadc196d lib/core/optiondict.py
4646
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
4747
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
4848
fcb74fcc9577523524659ec49e2e964b lib/core/session.py
49-
f01ac839011009e7c219fc11f528f348 lib/core/settings.py
49+
e854bd3a7ce6196a3ee3e3891473435e lib/core/settings.py
5050
0dfc2ed40adf72e302291f6ecd4406f6 lib/core/shell.py
5151
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
5252
a35efa7bec9f1e6cedf17c9830a79241 lib/core/target.py

0 commit comments

Comments
 (0)