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

Skip to content

Commit a9b6a07

Browse files
committed
Fixes #4006
1 parent 39ca716 commit a9b6a07

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

lib/controller/checks.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff 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

lib/core/option.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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)

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from 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"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

0 commit comments

Comments
 (0)