File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818from 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 "
2222TYPE = "dev" if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] != '0' else "stable"
2323TYPE_COLORS = {"dev" : 33 , "stable" : 90 , "pip" : 34 }
2424VERSION_STRING = "sqlmap/%s#%s" % ('.' .join (VERSION .split ('.' )[:- 1 ]) if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] == '0' else VERSION , TYPE )
Original file line number Diff line number Diff 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" ):
You can’t perform that action at this time.
0 commit comments