This commit is contained in:
Miroslav Stampar
2016-10-13 23:07:11 +02:00
parent 79377fedab
commit 1126ff86ce
3 changed files with 6 additions and 3 deletions

View File

@@ -888,6 +888,9 @@ def cmdLineParser(argv=None):
for i in xrange(len(argv)):
if argv[i] == "-hh":
argv[i] = "-h"
elif len(argv[i]) > 1 and all(ord(_) in xrange(0x2018, 0x2020) for _ in (argv[i][0], argv[i][-1])):
dataToStdout("[!] copy-pasting illegal (non-console) quote characters from Internet is, well, illegal (%s)\n" % argv[i])
raise SystemExit
elif re.search(r"\A-\w=.+", argv[i]):
dataToStdout("[!] potentially miswritten (illegal '=') short option detected ('%s')\n" % argv[i])
raise SystemExit