File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424from lib .core .defaults import defaults
2525from lib .core .enums import AUTOCOMPLETE_TYPE
2626from lib .core .exception import SqlmapShellQuitException
27+ from lib .core .exception import SqlmapSyntaxException
2728from lib .core .settings import BASIC_HELP_ITEMS
2829from lib .core .settings import DUMMY_URL
2930from lib .core .settings import IS_WIN
@@ -839,8 +840,11 @@ def _(self, *args):
839840 loadHistory (AUTOCOMPLETE_TYPE .SQLMAP )
840841 break
841842
842- for arg in shlex .split (command ):
843- argv .append (getUnicode (arg , encoding = sys .stdin .encoding ))
843+ try :
844+ for arg in shlex .split (command ):
845+ argv .append (getUnicode (arg , encoding = sys .stdin .encoding ))
846+ except ValueError , ex :
847+ raise SqlmapSyntaxException , "something went wrong during command line parsing ('%s')" % ex
844848
845849 # Hide non-basic options in basic help case
846850 for i in xrange (len (argv )):
You can’t perform that action at this time.
0 commit comments