mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 08:14:24 +03:00
minor refactoring
This commit is contained in:
parent
a43d252ae9
commit
e8be14e00a
|
@ -11,6 +11,7 @@ import re
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from lib.core.agent import agent
|
from lib.core.agent import agent
|
||||||
|
from lib.core.common import extractRegexResult
|
||||||
from lib.core.common import getUnicode
|
from lib.core.common import getUnicode
|
||||||
from lib.core.common import randomInt
|
from lib.core.common import randomInt
|
||||||
from lib.core.common import replaceNewlineTabs
|
from lib.core.common import replaceNewlineTabs
|
||||||
|
@ -55,16 +56,13 @@ def errorUse(expression):
|
||||||
|
|
||||||
payload = agent.payload(newValue=expression)
|
payload = agent.payload(newValue=expression)
|
||||||
reqBody, _ = Request.queryPage(payload, content=True)
|
reqBody, _ = Request.queryPage(payload, content=True)
|
||||||
match = re.search(check, reqBody, re.DOTALL | re.IGNORECASE)
|
output = extractRegexResult(check, reqBody, re.DOTALL | re.IGNORECASE)
|
||||||
|
|
||||||
if match:
|
if output:
|
||||||
output = match.group('result')
|
output = output.replace(ERROR_SPACE, " ").replace(ERROR_EMPTY_CHAR, "")
|
||||||
|
|
||||||
if output:
|
if conf.verbose > 0:
|
||||||
output = output.replace(ERROR_SPACE, " ").replace(ERROR_EMPTY_CHAR, "")
|
infoMsg = "retrieved: %s" % replaceNewlineTabs(output, stdout=True)
|
||||||
|
logger.info(infoMsg)
|
||||||
if conf.verbose > 0:
|
|
||||||
infoMsg = "retrieved: %s" % replaceNewlineTabs(output, stdout=True)
|
|
||||||
logger.info(infoMsg)
|
|
||||||
|
|
||||||
return output
|
return output
|
||||||
|
|
Loading…
Reference in New Issue
Block a user