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

Skip to content

Commit f7d42af

Browse files
committed
some fixes regarding --check-payload
1 parent b3b2c38 commit f7d42af

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

lib/utils/checkpayload.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ def checkPayload(payload):
5050

5151
if payload:
5252
for rule, desc in rules:
53-
try:
54-
regObj = getCompiledRegex(rule)
55-
if regObj.search(payload):
56-
logger.warn("highly probable IDS/IPS detection: '%s: %s'" % (desc, payload))
57-
except: # Some issues with some regex expressions in Python 2.5
58-
pass
53+
regObj = getCompiledRegex(rule)
54+
if regObj.search(payload):
55+
logger.warn("highly probable IDS/IPS detection: '%s: %s'" % (desc, payload))

xml/phpids_rules.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
</filter>
5757
<filter>
5858
<id>45</id>
59-
<rule><![CDATA[(?:union\s*(?:all|distinct|[(!@]*)?\s*[([]*\s*select)|(?:\w+\s+like\s+\")|(?:like\s*"\%)|(?:"\s*like\W*["\d])|(?:"\s*(?:n?and|x?or|not |\|\||\&\&)\s+[\s\w]+=\s*\w+\s*having)|(?:"\s*\*\s*\w+\W+")|(?:"\s*[^?\w\s=.,;)(]+\s*[(@"]*\s*\w+\W+\w)|(?:select\s*[\[\]()\s\w\.,-]+from)]]></rule>
59+
<rule><![CDATA[(?:union\s*(?:all|distinct|[(!@]+)?\s*[([]*\s*select)|(?:\w+\s+like\s+\")|(?:like\s*"\%)|(?:"\s*like\W*["\d])|(?:"\s*(?:n?and|x?or|not |\|\||\&\&)\s+[\s\w]+=\s*\w+\s*having)|(?:"\s*\*\s*\w+\W+")|(?:"\s*[^?\w\s=.,;)(]+\s*[(@"]*\s*\w+\W+\w)|(?:select\s*[\[\]()\s\w\.,-]+from)]]></rule>
6060
<description>Detects basic SQL authentication bypass attempts 2/3</description>
6161
<tags>
6262
<tag>sqli</tag>

0 commit comments

Comments
 (0)