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

Skip to content

Commit 48b407c

Browse files
committed
Updates regarding the #3316
1 parent 4466504 commit 48b407c

5 files changed

Lines changed: 24 additions & 5 deletions

File tree

doc/THANKS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,9 @@ Efrain Torres, <et(at)metasploit.com>
565565
* for helping out to improve the Metasploit Framework sqlmap auxiliary module and for committing it on the Metasploit official subversion repository
566566
* for his great Metasploit WMAP Framework
567567

568+
Jennifer Torres, <jtorresf42(at)gmail.com>
569+
* for contributing a tamper script luanginxwafbypass.py
570+
568571
Sandro Tosi, <matrixhasu(at)gmail.com>
569572
* for helping to create sqlmap Debian package correctly
570573

lib/core/enums.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,3 +378,7 @@ class TIMEOUT_STATE:
378378
NORMAL = 0
379379
EXCEPTION = 1
380380
TIMEOUT = 2
381+
382+
class HINT:
383+
PREPEND = 0
384+
APPEND = 1

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.10.30"
22+
VERSION = "1.2.10.31"
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/request/connect.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ class WebSocketException(Exception):
6969
from lib.core.enums import ADJUST_TIME_DELAY
7070
from lib.core.enums import AUTH_TYPE
7171
from lib.core.enums import CUSTOM_LOGGING
72+
from lib.core.enums import HINT
7273
from lib.core.enums import HTTP_HEADER
7374
from lib.core.enums import HTTPMETHOD
7475
from lib.core.enums import NULLCONNECTION
@@ -816,10 +817,14 @@ def queryPage(value=None, place=None, content=False, getRatioValue=False, silent
816817
conf.httpHeaders.append((HTTP_HEADER.CONTENT_TYPE, contentType))
817818

818819
if payload:
820+
delimiter = conf.paramDel or (DEFAULT_GET_POST_DELIMITER if place != PLACE.COOKIE else DEFAULT_COOKIE_DELIMITER)
821+
819822
if not disableTampering and kb.tamperFunctions:
820823
for function in kb.tamperFunctions:
824+
hints = {}
825+
821826
try:
822-
payload = function(payload=payload, headers=auxHeaders)
827+
payload = function(payload=payload, headers=auxHeaders, delimiter=delimiter, hints=hints)
823828
except Exception, ex:
824829
errMsg = "error occurred while running tamper "
825830
errMsg += "function '%s' ('%s')" % (function.func_name, getSafeExString(ex))
@@ -832,6 +837,13 @@ def queryPage(value=None, place=None, content=False, getRatioValue=False, silent
832837

833838
value = agent.replacePayload(value, payload)
834839

840+
if hints:
841+
if HINT.APPEND in hints:
842+
value = "%s%s%s" % (value, delimiter, hints[HINT.APPEND])
843+
844+
if HINT.PREPEND in hints:
845+
value = "%s%s%s" % (hints[HINT.PREPEND], delimiter, value)
846+
835847
logger.log(CUSTOM_LOGGING.PAYLOAD, safecharencode(payload.replace('\\', BOUNDARY_BACKSLASH_MARKER)).replace(BOUNDARY_BACKSLASH_MARKER, '\\'))
836848

837849
if place == PLACE.CUSTOM_POST and kb.postHint:

txt/checksum.md5

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ ce7fb7270b104f05d1e2be088b69c976 lib/core/common.py
3737
fbb55cc6100318ff922957b6577dc58f lib/core/defaults.py
3838
ac7c070b2726d39fbac1916b1a5f92b2 lib/core/dicts.py
3939
760de985e09f5d11aacd3a8f2d8e9ff2 lib/core/dump.py
40-
ee7da34f4947739778a07d6c9c05ab54 lib/core/enums.py
40+
0cf974cf4ff3b96e1a349a12e39f4693 lib/core/enums.py
4141
cada93357a7321655927fc9625b3bfec lib/core/exception.py
4242
1e5532ede194ac9c083891c2f02bca93 lib/core/__init__.py
4343
458a194764805cd8312c14ecd4be4d1e lib/core/log.py
@@ -49,7 +49,7 @@ c8c386d644d57c659d74542f5f57f632 lib/core/patch.py
4949
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
5050
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
5151
fcb74fcc9577523524659ec49e2e964b lib/core/session.py
52-
8abd15c74363a1de79976adeb95fba4a lib/core/settings.py
52+
737cfceb9db54a600e3983ef350f939a lib/core/settings.py
5353
dd68a9d02fccb4fa1428b20e15b0db5d lib/core/shell.py
5454
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
5555
47ad325975ab21fc9f11d90b46d0d143 lib/core/target.py
@@ -71,7 +71,7 @@ f6b5957bf2103c3999891e4f45180bce lib/parse/payloads.py
7171
30eed3a92a04ed2c29770e1b10d39dc0 lib/request/basicauthhandler.py
7272
2b81435f5a7519298c15c724e3194a0d lib/request/basic.py
7373
859b6ad583e0ffba154f17ee179b5b89 lib/request/comparison.py
74-
35db2a1779b9c71dfa183ac1f8995a5b lib/request/connect.py
74+
95aeaefe56d22290b06c13acb13dfced lib/request/connect.py
7575
dd4598675027fae99f2e2475b05986da lib/request/direct.py
7676
2044fce3f4ffa268fcfaaf63241b1e64 lib/request/dns.py
7777
98535d0efca5551e712fcc4b34a3f772 lib/request/httpshandler.py

0 commit comments

Comments
 (0)