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

Skip to content

Commit 2f8846c

Browse files
committed
Fix for an Issue #636
1 parent d1a6a77 commit 2f8846c

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

lib/techniques/blind/inference.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
See the file 'doc/COPYING' for copying permission
66
"""
77

8-
import re
98
import threading
109
import time
1110

@@ -199,7 +198,7 @@ def validateChar(idx, value):
199198
value are not equal there will be a deliberate delay).
200199
"""
201200

202-
if CHAR_INFERENCE_MARK not in payload:
201+
if "'%s'" % CHAR_INFERENCE_MARK not in payload:
203202
forgedPayload = safeStringFormat(payload.replace(INFERENCE_GREATER_CHAR, INFERENCE_NOT_EQUALS_CHAR), (expressionUnescaped, idx, value))
204203
else:
205204
# e.g.: ... > '%c' -> ... > ORD(..)
@@ -255,7 +254,7 @@ def getChar(idx, charTbl=None, continuousOrder=True, expand=charsetType is None,
255254
position = (len(charTbl) >> 1)
256255
posValue = charTbl[position]
257256

258-
if not re.search(r"%s\b" % CHAR_INFERENCE_MARK, payload):
257+
if "'%s'" % CHAR_INFERENCE_MARK not in payload:
259258
forgedPayload = safeStringFormat(payload, (expressionUnescaped, idx, posValue))
260259
else:
261260
# e.g.: ... > '%c' -> ... > ORD(..)

0 commit comments

Comments
 (0)