File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -786,8 +786,12 @@ def genCmpPayload():
786786 infoMsg = "executing alerting shell command(s) ('%s')" % conf .alert
787787 logger .info (infoMsg )
788788
789- process = subprocess .Popen (conf .alert .encode (sys .getfilesystemencoding () or UNICODE_ENCODING ), shell = True )
790- process .wait ()
789+ try :
790+ process = subprocess .Popen (conf .alert .encode (sys .getfilesystemencoding () or UNICODE_ENCODING ), shell = True )
791+ process .wait ()
792+ except Exception as ex :
793+ errMsg = "error occurred while executing '%s' ('%s')" % (conf .alert , getSafeExString (ex ))
794+ logger .error (errMsg )
791795
792796 kb .alerted = True
793797
Original file line number Diff line number Diff line change @@ -2560,6 +2560,10 @@ def _basicOptionValidation():
25602560 errMsg = "option '--proxy' is incompatible with switch '--ignore-proxy'"
25612561 raise SqlmapSyntaxException (errMsg )
25622562
2563+ if conf .alert and conf .alert .startswith ('-' ):
2564+ errMsg = "value for option '--alert' must be valid operating system command(s)"
2565+ raise SqlmapSyntaxException (errMsg )
2566+
25632567 if conf .timeSec < 1 :
25642568 errMsg = "value for option '--time-sec' must be a positive integer"
25652569 raise SqlmapSyntaxException (errMsg )
Original file line number Diff line number Diff line change 1818from thirdparty .six import unichr as _unichr
1919
2020# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21- VERSION = "1.3.11.28 "
21+ VERSION = "1.3.11.29 "
2222TYPE = "dev" if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] != '0' else "stable"
2323TYPE_COLORS = {"dev" : 33 , "stable" : 90 , "pip" : 34 }
2424VERSION_STRING = "sqlmap/%s#%s" % ('.' .join (VERSION .split ('.' )[:- 1 ]) if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] == '0' else VERSION , TYPE )
You can’t perform that action at this time.
0 commit comments