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

Skip to content

Commit 31bf1fc

Browse files
committed
Update regarding #4239
1 parent d4d83b2 commit 31bf1fc

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

lib/core/common.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
from lib.core.settings import DEFAULT_GET_POST_DELIMITER
117117
from lib.core.settings import DEFAULT_MSSQL_SCHEMA
118118
from lib.core.settings import DEV_EMAIL_ADDRESS
119+
from lib.core.settings import DOLLAR_MARKER
119120
from lib.core.settings import DUMMY_USER_INJECTION
120121
from lib.core.settings import DYNAMICITY_BOUNDARY_LENGTH
121122
from lib.core.settings import ERROR_PARSING_REGEXES
@@ -2865,6 +2866,8 @@ def urlencode(value, safe="%&=-_", convall=False, limit=False, spaceplus=False):
28652866
result = None if value is None else ""
28662867

28672868
if value:
2869+
value = re.sub(r"\b[$\w]+=", lambda match: match.group(0).replace('$', DOLLAR_MARKER), value)
2870+
28682871
if Backend.isDbms(DBMS.MSSQL) and not kb.tamperFunctions and any(ord(_) > 255 for _ in value):
28692872
warnMsg = "if you experience problems with "
28702873
warnMsg += "non-ASCII identifier names "
@@ -2899,6 +2902,8 @@ def urlencode(value, safe="%&=-_", convall=False, limit=False, spaceplus=False):
28992902
if spaceplus:
29002903
result = result.replace(_urllib.parse.quote(' '), '+')
29012904

2905+
result = result.replace(DOLLAR_MARKER, '$')
2906+
29022907
return result
29032908

29042909
def runningAsAdmin():

lib/core/settings.py

Lines changed: 2 additions & 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.6.12"
21+
VERSION = "1.4.6.13"
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)
@@ -69,6 +69,7 @@
6969
BOUNDED_INJECTION_MARKER = "__BOUNDED_INJECTION_MARK__"
7070
SAFE_VARIABLE_MARKER = "__SAFE__"
7171
SAFE_HEX_MARKER = "__SAFE_HEX__"
72+
DOLLAR_MARKER = "__DOLLAR__"
7273

7374
RANDOM_INTEGER_MARKER = "[RANDINT]"
7475
RANDOM_STRING_MARKER = "[RANDSTR]"

0 commit comments

Comments
 (0)