|
38 | 38 | from lib.core.settings import CHAR_INFERENCE_MARK |
39 | 39 | from lib.core.settings import INFERENCE_BLANK_BREAK |
40 | 40 | from lib.core.settings import INFERENCE_UNKNOWN_CHAR |
| 41 | +from lib.core.settings import INFERENCE_GREATER_CHAR |
| 42 | +from lib.core.settings import INFERENCE_EQUALS_CHAR |
41 | 43 | from lib.core.unescaper import unescaper |
42 | 44 | from lib.request.connect import Connect as Request |
43 | 45 |
|
@@ -129,7 +131,7 @@ def tryHint(idx): |
129 | 131 | else: |
130 | 132 | posValue = ord(hintValue[idx-1]) |
131 | 133 |
|
132 | | - forgedPayload = safeStringFormat(payload.replace('%3E', '%3D'), (expressionUnescaped, idx, posValue)) |
| 134 | + forgedPayload = safeStringFormat(payload.replace(INFERENCE_GREATER_CHAR, INFERENCE_EQUALS_CHAR), (expressionUnescaped, idx, posValue)) |
133 | 135 | queriesCount[0] += 1 |
134 | 136 | result = Request.queryPage(forgedPayload, timeBasedCompare=timeBasedCompare, raise404=False) |
135 | 137 |
|
@@ -163,7 +165,7 @@ def getChar(idx, charTbl=asciiTbl, continuousOrder=True, expand=charsetType is N |
163 | 165 | charTbl.remove(ord('\n')) |
164 | 166 |
|
165 | 167 | if len(charTbl) == 1: |
166 | | - forgedPayload = safeStringFormat(payload.replace('%3E', '%3D'), (expressionUnescaped, idx, charTbl[0])) |
| 168 | + forgedPayload = safeStringFormat(payload.replace(INFERENCE_GREATER_CHAR, INFERENCE_EQUALS_CHAR), (expressionUnescaped, idx, charTbl[0])) |
167 | 169 | queriesCount[0] += 1 |
168 | 170 | result = Request.queryPage(forgedPayload, timeBasedCompare=timeBasedCompare, raise404=False) |
169 | 171 |
|
@@ -239,7 +241,7 @@ def getChar(idx, charTbl=asciiTbl, continuousOrder=True, expand=charsetType is N |
239 | 241 | # both minValue and character afterwards are possible |
240 | 242 | # candidates |
241 | 243 | for retVal in (originalTbl[originalTbl.index(minValue)], originalTbl[originalTbl.index(minValue) + 1]): |
242 | | - forgedPayload = safeStringFormat(payload.replace('%3E', '%3D'), (expressionUnescaped, idx, retVal)) |
| 244 | + forgedPayload = safeStringFormat(payload.replace(INFERENCE_GREATER_CHAR, INFERENCE_EQUALS_CHAR), (expressionUnescaped, idx, retVal)) |
243 | 245 | queriesCount[0] += 1 |
244 | 246 | result = Request.queryPage(forgedPayload, timeBasedCompare=timeBasedCompare, raise404=False) |
245 | 247 |
|
|
0 commit comments