mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 08:14:24 +03:00
Minor improvement to --check-payload
This commit is contained in:
parent
d5fb1378cc
commit
beb98140b3
|
@ -16,7 +16,6 @@ from lib.core.data import conf
|
||||||
from lib.core.data import paths
|
from lib.core.data import paths
|
||||||
from lib.core.data import logger
|
from lib.core.data import logger
|
||||||
|
|
||||||
|
|
||||||
rules = None
|
rules = None
|
||||||
|
|
||||||
def __adjustGrammar(string):
|
def __adjustGrammar(string):
|
||||||
|
@ -36,6 +35,7 @@ def checkPayload(payload):
|
||||||
|
|
||||||
global rules
|
global rules
|
||||||
|
|
||||||
|
detected = False
|
||||||
payload = urldecode(payload)
|
payload = urldecode(payload)
|
||||||
|
|
||||||
if not rules:
|
if not rules:
|
||||||
|
@ -50,5 +50,10 @@ def checkPayload(payload):
|
||||||
if payload:
|
if payload:
|
||||||
for rule, desc in rules:
|
for rule, desc in rules:
|
||||||
regObj = getCompiledRegex(rule)
|
regObj = getCompiledRegex(rule)
|
||||||
|
|
||||||
if regObj.search(payload):
|
if regObj.search(payload):
|
||||||
|
detected = True
|
||||||
logger.warn("highly probable IDS/IPS detection: '%s: %s'" % (desc, payload))
|
logger.warn("highly probable IDS/IPS detection: '%s: %s'" % (desc, payload))
|
||||||
|
|
||||||
|
if not detected:
|
||||||
|
logger.warn("payload '%s' possibly gone undetected" % payload)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user