Fixing some of WAF bypass bugs

This commit is contained in:
Miroslav Štampar 2026-08-17 16:41:49 +02:00
parent dc42edc19f
commit 49a774035f
5 changed files with 37 additions and 8 deletions

View file

@ -423,7 +423,10 @@ def _doSearch():
conf.googlePage += 1
def _setStdinPipeTargets():
if conf.url:
# Note: an explicit target source takes precedence. Without this, any non-interactive run (CI,
# cron, subprocess) would reroute '-m/-l/-r/-g' targets through the STDIN container, losing both
# their count and their order
if any((conf.url, conf.direct, conf.logFile, conf.bulkFile, conf.requestFile, conf.googleDork, conf.openApiFile)):
return
if isinstance(conf.stdinPipe, _collections.Iterable):

View file

@ -20,7 +20,7 @@ from lib.core.enums import OS
from thirdparty import six
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.10.8.42"
VERSION = "1.10.8.43"
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)
@ -88,7 +88,7 @@ WAF_BYPASS_TAMPERS = (
)
# Maximum number of candidate tamper (chains) trialled during automatic WAF-bypass
WAF_BYPASS_MAX_TRIALS = 8
WAF_BYPASS_MAX_TRIALS = len(WAF_BYPASS_TAMPERS)
# Browser-like request headers applied alongside the random (non-scanner) User-Agent during
# automatic WAF bypass: sqlmap's defaults ('Accept: */*', no 'Accept-Language') are themselves a

View file

@ -1215,7 +1215,10 @@ def cmdLineParser(argv=None):
if args.dummy:
args.url = args.url or DUMMY_URL
if hasattr(sys.stdin, "fileno") and not any((os.isatty(sys.stdin.fileno()), args.api, args.ignoreStdin, "GITHUB_ACTIONS" in os.environ)):
# Note: an explicit target source rules out reading targets from the standard input. Without
# this, any non-interactive run (CI, cron, subprocess) would turn '-d/-u/-m/-l/-r/-g' into a
# 'multiple targets' run reading from a pipe, which also resets per-target options in between
if hasattr(sys.stdin, "fileno") and not any((os.isatty(sys.stdin.fileno()), args.api, args.ignoreStdin, "GITHUB_ACTIONS" in os.environ, args.direct, args.url, args.logFile, args.bulkFile, args.requestFile, args.googleDork, args.configFile, args.openApiFile)):
args.stdinPipe = iter(sys.stdin.readline, None)
else:
args.stdinPipe = None