Skip to content

Commit b8fa0ed

Browse files
committed
Fixes #5232
1 parent 55b2b43 commit b8fa0ed

File tree

3 files changed

+17
-20
lines changed

3 files changed

+17
-20
lines changed

lib/controller/checks.py

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import random
1111
import re
1212
import socket
13-
import subprocess
1413
import time
1514

1615
from 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

lib/controller/controller.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import os
1111
import re
12+
import subprocess
1213
import time
1314

1415
from 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

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from 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"
2424
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2525
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2626
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)