File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010import random
1111import re
1212import socket
13- import subprocess
1413import time
1514
1615from extra .beep .beep import beep
@@ -783,22 +782,8 @@ def genCmpPayload():
783782 injection .conf .regexp = conf .regexp
784783 injection .conf .optimize = conf .optimize
785784
786- if not kb .alerted :
787- if conf .beep :
788- beep ()
789-
790- if conf .alert :
791- infoMsg = "executing alerting shell command(s) ('%s')" % conf .alert
792- logger .info (infoMsg )
793-
794- try :
795- process = subprocess .Popen (conf .alert , shell = True )
796- process .wait ()
797- except Exception as ex :
798- errMsg = "error occurred while executing '%s' ('%s')" % (conf .alert , getSafeExString (ex ))
799- logger .error (errMsg )
800-
801- kb .alerted = True
785+ if conf .beep :
786+ beep ()
802787
803788 # There is no need to perform this test for other
804789 # <where> tags
@@ -859,10 +844,8 @@ def genCmpPayload():
859844 if not checkFalsePositives (injection ):
860845 if conf .hostname in kb .vulnHosts :
861846 kb .vulnHosts .remove (conf .hostname )
862-
863847 if NOTE .FALSE_POSITIVE_OR_UNEXPLOITABLE not in injection .notes :
864848 injection .notes .append (NOTE .FALSE_POSITIVE_OR_UNEXPLOITABLE )
865-
866849 else :
867850 injection = None
868851
Original file line number Diff line number Diff line change 99
1010import os
1111import re
12+ import subprocess
1213import time
1314
1415from lib .controller .action import action
@@ -598,6 +599,19 @@ def start():
598599
599600 kb .injections .append (injection )
600601
602+ if not kb .alerted :
603+ if conf .alert :
604+ infoMsg = "executing alerting shell command(s) ('%s')" % conf .alert
605+ logger .info (infoMsg )
606+ try :
607+ process = subprocess .Popen (conf .alert , shell = True )
608+ process .wait ()
609+ except Exception as ex :
610+ errMsg = "error occurred while executing '%s' ('%s')" % (conf .alert , getSafeExString (ex ))
611+ logger .error (errMsg )
612+
613+ kb .alerted = True
614+
601615 # In case when user wants to end detection phase (Ctrl+C)
602616 if not proceed :
603617 break
Original file line number Diff line number Diff line change 2020from thirdparty .six import unichr as _unichr
2121
2222# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
23- VERSION = "1.6.11.5 "
23+ VERSION = "1.6.11.6 "
2424TYPE = "dev" if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] != '0' else "stable"
2525TYPE_COLORS = {"dev" : 33 , "stable" : 90 , "pip" : 34 }
2626VERSION_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