File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2653,7 +2653,7 @@ def __init__(self):
26532653
26542654 if pointer in (None , head ):
26552655 errMsg = "mnemonic '%s' can't be resolved to any parameter name" % name
2656- logger . error ( errMsg )
2656+ raise sqlmapSyntaxException , errMsg
26572657 elif len (pointer .current ) > 1 :
26582658 options = {}
26592659 for option in pointer .current :
@@ -2678,5 +2678,8 @@ def __init__(self):
26782678 value = found .convert_value (found , value )
26792679 if value is not None :
26802680 setattr (args , found .dest , value )
2681- else :
2681+ elif not found . type : # boolean
26822682 setattr (args , found .dest , True )
2683+ else :
2684+ errMsg = "mnemonic '%s' requires value of type '%s'" % (name , found .type )
2685+ raise sqlmapSyntaxException , errMsg
Original file line number Diff line number Diff line change @@ -63,17 +63,17 @@ def main():
6363 Main function of sqlmap when running from command line.
6464 """
6565
66- paths .SQLMAP_ROOT_PATH = modulePath ()
67- setPaths ()
68- banner ()
66+ try :
67+ paths .SQLMAP_ROOT_PATH = modulePath ()
68+ setPaths ()
69+ banner ()
6970
70- # Store original command line options for possible later restoration
71- cmdLineOptions .update (cmdLineParser ().__dict__ )
71+ # Store original command line options for possible later restoration
72+ cmdLineOptions .update (cmdLineParser ().__dict__ )
7273
73- dataToStdout ("[!] legal disclaimer: %s\n \n " % LEGAL_DISCLAIMER , forceOutput = True )
74- dataToStdout ("[*] starting at %s\n \n " % time .strftime ("%X" ), forceOutput = True )
74+ dataToStdout ("[!] legal disclaimer: %s\n \n " % LEGAL_DISCLAIMER , forceOutput = True )
75+ dataToStdout ("[*] starting at %s\n \n " % time .strftime ("%X" ), forceOutput = True )
7576
76- try :
7777 init (cmdLineOptions )
7878 if conf .profile :
7979 profile ()
You can’t perform that action at this time.
0 commit comments