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

Skip to content

Commit 98f5586

Browse files
committed
minor update
1 parent f8850e3 commit 98f5586

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

lib/techniques/blind/inference.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
from lib.core.common import getCharset
1818
from lib.core.common import goGoodSamaritan
1919
from lib.core.common import getPartRun
20+
from lib.core.common import popValue
21+
from lib.core.common import pushValue
2022
from lib.core.common import readInput
2123
from lib.core.common import replaceNewlineTabs
2224
from lib.core.common import safeStringFormat
@@ -113,7 +115,7 @@ def tryHint(idx):
113115
hintlock.release()
114116

115117
if hintValue is not None and len(hintValue) >= idx:
116-
if kb.dbms == "SQLite":
118+
if kb.dbms in ("SQLite", "Microsoft Access", "SAP MaxDB"):
117119
posValue = hintValue[idx-1]
118120
else:
119121
posValue = ord(hintValue[idx-1])
@@ -165,17 +167,17 @@ def getChar(idx, charTbl=asciiTbl, continuousOrder=True, expand=charsetType is N
165167
position = (len(charTbl) >> 1)
166168
posValue = charTbl[position]
167169

168-
if kb.dbms == "SQLite":
169-
posValueOld = posValue
170+
if kb.dbms in ("SQLite", "Microsoft Access", "SAP MaxDB"):
171+
pushValue(posValue)
170172
posValue = chr(posValue) if posValue < 128 else unichr(posValue)
171173

172174
forgedPayload = safeStringFormat(payload, (expressionUnescaped, idx, posValue))
173175

174176
queriesCount[0] += 1
175177
result = Request.queryPage(urlencode(forgedPayload))
176178

177-
if kb.dbms == "SQLite":
178-
posValue = posValueOld
179+
if kb.dbms in ("SQLite", "Microsoft Access", "SAP MaxDB"):
180+
posValue = popValue()
179181

180182
if result:
181183
minValue = posValue

xml/queries.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@
354354
<timedelay/>
355355
<substring query="MID((%s), %d, %d)"/>
356356
<case query="IIF(%s,1,0)"/>
357+
<inference query="AND MID((%s), %d, 1) > '%s'"/>
357358
<banner/>
358359
<current_user query="SELECT CURRENTUSER()"/>
359360
<current_db/>
@@ -429,6 +430,7 @@
429430
<current_db query="SELECT DATABASE() FROM DUAL"/>
430431
<order query="ORDER BY %s ASC"/>
431432
<case query="SELECT (CASE WHEN (%s) THEN 1 ELSE 0 END)"/>
433+
<inference query="AND SUBSTR((%s), %d, 1) > '%s'"/>
432434
<delimiter query=","/>
433435
<substring query="SUBSTR((%s), %d, %d)"/>
434436
</dbms>

0 commit comments

Comments
 (0)