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

Skip to content

Commit 8189a10

Browse files
committed
Fixes #3517
1 parent f81e427 commit 8189a10

4 files changed

Lines changed: 8 additions & 6 deletions

File tree

lib/core/option.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1690,8 +1690,8 @@ def _cleanupOptions():
16901690
re.compile(conf.csrfToken)
16911691

16921692
if re.escape(conf.csrfToken) != conf.csrfToken:
1693-
message = "provided value for option '--csrf-token' is a regular expression? [Y/n] "
1694-
if not readInput(message, default='Y', boolean=True):
1693+
message = "provided value for option '--csrf-token' is a regular expression? [y/N] "
1694+
if not readInput(message, default='N', boolean=True):
16951695
conf.csrfToken = re.escape(conf.csrfToken)
16961696
except re.error:
16971697
conf.csrfToken = re.escape(conf.csrfToken)

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.3.3.6"
22+
VERSION = "1.3.3.7"
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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -983,6 +983,8 @@ def _adjustParameter(paramString, parameter, newValue):
983983

984984
token = AttribDict()
985985
page, headers, code = Connect.getPage(url=conf.csrfUrl or conf.url, data=conf.data if conf.csrfUrl == conf.url else None, method=conf.method if conf.csrfUrl == conf.url else None, cookie=conf.parameters.get(PLACE.COOKIE), direct=True, silent=True, ua=conf.parameters.get(PLACE.USER_AGENT), referer=conf.parameters.get(PLACE.REFERER), host=conf.parameters.get(PLACE.HOST))
986+
page = urldecode(page) # for anti-CSRF tokens with special characters in their name (e.g. 'foo:bar=...')
987+
986988
match = re.search(r"(?i)<input[^>]+\bname=[\"']?(?P<name>%s)\b[^>]*\bvalue=[\"']?(?P<value>[^>'\"]*)" % conf.csrfToken, page or "", re.I)
987989

988990
if not match:

txt/checksum.md5

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ abcb1121eb56d3401839d14e8ed06b6e lib/core/data.py
4343
fb6be55d21a70765e35549af2484f762 lib/core/__init__.py
4444
18c896b157b03af716542e5fe9233ef9 lib/core/log.py
4545
947f41084e551ff3b7ef7dda2f25ef20 lib/core/optiondict.py
46-
5d21cede75bd8043a0b9f2605047ea07 lib/core/option.py
46+
aa327bbad1d25b60cd2a95b4846241eb lib/core/option.py
4747
fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
4848
4b12aa67fbf6c973d12e54cf9cb54ea0 lib/core/profiling.py
4949
d5ef43fe3cdd6c2602d7db45651f9ceb lib/core/readlineng.py
5050
7d8a22c582ad201f65b73225e4456170 lib/core/replication.py
5151
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
5252
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
53-
876529091deda9b41e53885480386bf1 lib/core/settings.py
53+
517b9f2f5e37f75cc872a7b0741a3fcf lib/core/settings.py
5454
4483b4a5b601d8f1c4281071dff21ecc lib/core/shell.py
5555
10fd19b0716ed261e6d04f311f6f527c lib/core/subprocessng.py
5656
43772ea73e9e3d446f782af591cb4eda lib/core/target.py
@@ -72,7 +72,7 @@ adcecd2d6a8667b22872a563eb83eac0 lib/parse/payloads.py
7272
e4ea70bcd461f5176867dcd89d372386 lib/request/basicauthhandler.py
7373
b23163d485e0dbc038cbf1ba80be11da lib/request/basic.py
7474
fc25d951217077fe655ed2a3a81552ae lib/request/comparison.py
75-
d2e7673ed4838a321b825ea1854ea2c0 lib/request/connect.py
75+
5141f518c79355ce0e1fcd11a942f324 lib/request/connect.py
7676
43005bd6a78e9cf0f3ed2283a1cb122e lib/request/direct.py
7777
2b7509ba38a667c61cefff036ec4ca6f lib/request/dns.py
7878
ceac6b3bf1f726f8ff43c6814e9d7281 lib/request/httpshandler.py

0 commit comments

Comments
 (0)