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

Skip to content

Commit 37b8d0c

Browse files
committed
utf8 decoding of program arguments
1 parent f26de89 commit 37b8d0c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/parse/cmdline.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
from optparse import OptionParser
3030
from optparse import SUPPRESS_HELP
3131

32+
from lib.core.convert import utf8decode
3233
from lib.core.data import logger
3334
from lib.core.settings import VERSION_STRING
3435

@@ -462,7 +463,7 @@ def cmdLineParser():
462463
parser.add_option_group(windows)
463464
parser.add_option_group(miscellaneous)
464465

465-
(args, _) = parser.parse_args()
466+
(args, _) = parser.parse_args([utf8decode(arg) for arg in sys.argv])
466467

467468
if not args.direct and not args.url and not args.list and not args.googleDork and not args.configFile and not args.requestFile and not args.updateAll:
468469
errMsg = "missing a mandatory parameter ('-d', '-u', '-l', '-r', '-g', '-c' or '--update'), "

0 commit comments

Comments
 (0)