mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-09 08:00:36 +03:00
Patch for an Issue #1148
This commit is contained in:
parent
2af2aef43e
commit
eecc0b924b
|
@ -788,7 +788,16 @@ def cmdLineParser():
|
||||||
prompt = False
|
prompt = False
|
||||||
advancedHelp = True
|
advancedHelp = True
|
||||||
|
|
||||||
for arg in (sys.argv if not IS_WIN else shlex.split(" ".join(sys.argv))):
|
_ = sys.argv
|
||||||
|
|
||||||
|
# Python on Windows has problems with quote/whitespace cases like: python -c "import sys; print sys.argv" --dummy='foo: bar' # ['-c', "--dummy='foo:", "bar'"]
|
||||||
|
if IS_WIN:
|
||||||
|
try:
|
||||||
|
_ = shlex.split(" ".join(sys.argv), posix=False)
|
||||||
|
except ValueError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
for arg in _:
|
||||||
argv.append(getUnicode(arg, encoding=sys.getfilesystemencoding()))
|
argv.append(getUnicode(arg, encoding=sys.getfilesystemencoding()))
|
||||||
|
|
||||||
checkDeprecatedOptions(argv)
|
checkDeprecatedOptions(argv)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user