Minor update (adding support for silent mode)

This commit is contained in:
Miroslav Stampar
2025-02-20 23:50:20 +01:00
parent d058cc820d
commit ab5d5b3401
3 changed files with 7 additions and 4 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.9.2.11"
VERSION = "1.9.2.12"
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

@@ -1010,6 +1010,10 @@ def cmdLineParser(argv=None):
argv[i] = ""
elif argv[i] in DEPRECATED_OPTIONS:
argv[i] = ""
elif argv[i] in ("-s", "--silent"):
if i + 1 < len(argv) and argv[i + 1].startswith('-') or i + 1 == len(argv):
argv[i] = ""
conf.verbose = 0
elif argv[i].startswith("--data-raw"):
argv[i] = argv[i].replace("--data-raw", "--data", 1)
elif argv[i].startswith("--auth-creds"):
@@ -1018,7 +1022,6 @@ def cmdLineParser(argv=None):
argv[i] = argv[i].replace("--drop-cookie", "--drop-set-cookie", 1)
elif re.search(r"\A--tamper[^=\s]", argv[i]):
argv[i] = ""
continue
elif re.search(r"\A(--(tamper|ignore-code|skip))(?!-)", argv[i]):
key = re.search(r"\-?\-(\w+)\b", argv[i]).group(1)
index = auxIndexes.get(key, None)