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

Skip to content

Commit f437a54

Browse files
committed
Update regarding #3944
1 parent f05f84b commit f437a54

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

lib/core/settings.py

Lines changed: 1 addition & 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.3.9.23"
21+
VERSION = "1.3.9.24"
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)

lib/parse/cmdline.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -902,6 +902,7 @@ def _format_action_invocation(self, action):
902902
raise SqlmapSyntaxException("something went wrong during command line parsing ('%s')" % getSafeExString(ex))
903903

904904
for i in xrange(len(argv)):
905+
longOptions = set(re.findall(r"\-\-([^= ]+?)=", parser.format_help()))
905906
if argv[i] == "-hh":
906907
argv[i] = "-h"
907908
elif len(argv[i]) > 1 and all(ord(_) in xrange(0x2018, 0x2020) for _ in ((argv[i].split('=', 1)[-1].strip() or ' ')[0], argv[i][-1])):
@@ -949,6 +950,9 @@ def _format_action_invocation(self, action):
949950
found = True
950951
if not found:
951952
get_groups(parser).remove(group)
953+
elif '=' in argv[i] and not argv[i].startswith('-') and argv[i].split('=')[0] in longOptions and re.search(r"\A-\w\Z", argv[i - 1]) is None:
954+
dataToStdout("[!] detected usage of long-option without a starting hyphen ('%s')\n" % argv[i])
955+
raise SystemExit
952956

953957
for verbosity in (_ for _ in argv if re.search(r"\A\-v+\Z", _)):
954958
try:

0 commit comments

Comments
 (0)