mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-01-02 12:59:03 +00:00
removed ERROR_SPACE
This commit is contained in:
@@ -45,8 +45,6 @@ from lib.core.exception import sqlmapSiteTooDynamic
|
||||
from lib.core.exception import sqlmapUserQuitException
|
||||
from lib.core.session import setString
|
||||
from lib.core.session import setRegexp
|
||||
from lib.core.settings import ERROR_SPACE
|
||||
from lib.core.settings import ERROR_EMPTY_CHAR
|
||||
from lib.request.connect import Connect as Request
|
||||
from plugins.dbms.firebird.syntax import Syntax as Firebird
|
||||
from plugins.dbms.postgresql.syntax import Syntax as PostgreSQL
|
||||
@@ -331,7 +329,7 @@ def checkSqlInjection(place, parameter, value):
|
||||
output = extractRegexResult(check, reqBody, re.DOTALL | re.IGNORECASE)
|
||||
|
||||
if output:
|
||||
result = output.replace(ERROR_SPACE, " ").replace(ERROR_EMPTY_CHAR, "") == "1"
|
||||
result = output.replace(kb.misc.space, " ") == "1"
|
||||
|
||||
if result:
|
||||
infoMsg = "%s parameter '%s' is '%s' injectable " % (place, parameter, title)
|
||||
|
||||
@@ -34,6 +34,7 @@ class Agent:
|
||||
kb.misc.delimiter = randomStr(length=6)
|
||||
kb.misc.start = ":%s:" % randomStr(length=3, lowercase=True)
|
||||
kb.misc.stop = ":%s:" % randomStr(length=3, lowercase=True)
|
||||
kb.misc.space = ":%s:" % randomStr(length=1, lowercase=True)
|
||||
|
||||
def payloadDirect(self, query):
|
||||
if query.startswith("AND "):
|
||||
@@ -201,6 +202,7 @@ class Agent:
|
||||
payload = payload.replace("[RANDSTR1]", randStr1)
|
||||
payload = payload.replace("[DELIMITER_START]", kb.misc.start)
|
||||
payload = payload.replace("[DELIMITER_STOP]", kb.misc.stop)
|
||||
payload = payload.replace("[SPACE_REPLACE]", kb.misc.space)
|
||||
payload = payload.replace("[SLEEPTIME]", str(conf.timeSec))
|
||||
|
||||
if origvalue is not None:
|
||||
|
||||
@@ -46,10 +46,6 @@ DUMP_TAB_MARKER = "__TAB__"
|
||||
DUMP_START_MARKER = "__START__"
|
||||
DUMP_STOP_MARKER = "__STOP__"
|
||||
|
||||
# error-based injection markers
|
||||
ERROR_SPACE = ":_:"
|
||||
ERROR_EMPTY_CHAR = ":x:"
|
||||
|
||||
PAYLOAD_DELIMITER = "\x00"
|
||||
|
||||
# System variables
|
||||
|
||||
@@ -25,9 +25,6 @@ from lib.core.session import setError
|
||||
from lib.core.unescaper import unescaper
|
||||
from lib.request.connect import Connect as Request
|
||||
|
||||
from lib.core.settings import ERROR_SPACE
|
||||
from lib.core.settings import ERROR_EMPTY_CHAR
|
||||
|
||||
def errorUse(expression):
|
||||
"""
|
||||
Retrieve the output of a SQL query taking advantage of an error SQL
|
||||
@@ -59,7 +56,7 @@ def errorUse(expression):
|
||||
output = extractRegexResult(check, reqBody, re.DOTALL | re.IGNORECASE)
|
||||
|
||||
if output:
|
||||
output = output.replace(ERROR_SPACE, " ").replace(ERROR_EMPTY_CHAR, "")
|
||||
output = output.replace(kb.misc.space, " ")
|
||||
|
||||
if conf.verbose > 0:
|
||||
infoMsg = "retrieved: %s" % replaceNewlineTabs(output, stdout=True)
|
||||
|
||||
Reference in New Issue
Block a user