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

Skip to content

Commit 36938f8

Browse files
committed
Minor update
1 parent 99565f2 commit 36938f8

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.11.86"
21+
VERSION = "1.3.11.87"
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
@@ -910,6 +910,7 @@ def _format_action_invocation(self, action):
910910

911911
for i in xrange(len(argv)):
912912
longOptions = set(re.findall(r"\-\-([^= ]+?)=", parser.format_help()))
913+
longSwitches = set(re.findall(r"\-\-([^= ]+?)\s", parser.format_help()))
913914
if argv[i] == "-hh":
914915
argv[i] = "-h"
915916
elif i == 1 and re.search(r"\A(http|www\.|\w[\w.-]+\.\w{2,})", argv[i]) is not None:
@@ -923,6 +924,9 @@ def _format_action_invocation(self, action):
923924
elif re.search(r"\A-\w=.+", argv[i]):
924925
dataToStdout("[!] potentially miswritten (illegal '=') short option detected ('%s')\n" % argv[i])
925926
raise SystemExit
927+
elif re.search(r"\A-\w{3,}", argv[i]):
928+
if argv[i].strip('-').split('=')[0] in (longOptions | longSwitches):
929+
argv[i] = "-%s" % argv[i]
926930
elif argv[i] in DEPRECATED_OPTIONS:
927931
argv[i] = ""
928932
elif argv[i].startswith("--tamper"):

0 commit comments

Comments
 (0)