Fix for --jwt not able to confirm weaknesses when invalid tokens are answered with HTTP 401/403

This commit is contained in:
Miroslav Štampar 2026-11-12 17:15:33 +01:00
parent 6fb39709f2
commit 60dcd8bbb0
2 changed files with 6 additions and 1 deletions

View file

@ -19,7 +19,7 @@ from lib.core.enums import OS
from thirdparty import six
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.10.11.64"
VERSION = "1.10.11.65"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

View file

@ -85,6 +85,10 @@ def _send(token):
skipUrlEncode = conf.skipUrlEncode
conf.skipUrlEncode = True
# Note: a rejected token is commonly answered with HTTP 401/403 - that is an oracle answer here, not a connection problem
ignoreCode = conf.ignoreCode
conf.ignoreCode = list(set((ignoreCode or []) + [401, 403]))
if conf.delay:
time.sleep(conf.delay)
@ -110,6 +114,7 @@ def _send(token):
return None
finally:
conf.skipUrlEncode = skipUrlEncode
conf.ignoreCode = ignoreCode
return page