|
11 | 11 | import time |
12 | 12 |
|
13 | 13 | from lib.core.agent import agent |
| 14 | +from lib.core.common import Backend |
14 | 15 | from lib.core.common import calculateDeltaSeconds |
15 | 16 | from lib.core.common import dataToSessionFile |
16 | 17 | from lib.core.common import extractRegexResult |
17 | | -from lib.core.common import Backend |
18 | 18 | from lib.core.common import initTechnique |
19 | 19 | from lib.core.common import isNumPosStrValue |
| 20 | +from lib.core.common import listToStrValue |
20 | 21 | from lib.core.common import randomInt |
21 | 22 | from lib.core.common import replaceNewlineTabs |
22 | 23 | from lib.core.common import safeStringFormat |
@@ -55,12 +56,13 @@ def __oneShotErrorUse(expression, field): |
55 | 56 | payload = agent.payload(newValue=injExpression) |
56 | 57 |
|
57 | 58 | # Perform the request |
58 | | - page, _ = Request.queryPage(payload, content=True) |
| 59 | + page, headers = Request.queryPage(payload, content=True) |
59 | 60 | reqCount += 1 |
60 | 61 |
|
61 | 62 | # Parse the returned page to get the exact error-based |
62 | 63 | # sql injection output |
63 | | - output = extractRegexResult(check, page, re.DOTALL | re.IGNORECASE) |
| 64 | + output = extractRegexResult(check, page, re.DOTALL | re.IGNORECASE)\ |
| 65 | + or extractRegexResult(check, listToStrValue(headers.headers if headers else None), re.DOTALL | re.IGNORECASE) |
64 | 66 |
|
65 | 67 | dataToSessionFile("[%s][%s][%s][%s][%s]\n" % (conf.url, kb.injection.place, conf.parameters[kb.injection.place], expression, replaceNewlineTabs(output))) |
66 | 68 |
|
|
0 commit comments