mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-16 19:40:37 +03:00
minor fixes
This commit is contained in:
parent
9fa3619262
commit
b0a8238774
|
@ -131,7 +131,7 @@ def __formatInjection(inj):
|
||||||
title = sdata.title
|
title = sdata.title
|
||||||
vector = sdata.vector
|
vector = sdata.vector
|
||||||
if stype == PAYLOAD.TECHNIQUE.UNION:
|
if stype == PAYLOAD.TECHNIQUE.UNION:
|
||||||
count = re.sub(r"\(.+\)", "", sdata.payload).count(",") + 1
|
count = re.sub(r"(?i)(\(.+\))|(\blimit[^A-Za-z]+)", "", sdata.payload).count(',') + 1
|
||||||
title = re.sub(r"\d+ to \d+", str(count), title)
|
title = re.sub(r"\d+ to \d+", str(count), title)
|
||||||
vector = agent.forgeInbandQuery("[QUERY]", vector[0], vector[1], vector[2], None, None, vector[5], vector[6])
|
vector = agent.forgeInbandQuery("[QUERY]", vector[0], vector[1], vector[2], None, None, vector[5], vector[6])
|
||||||
if count == 1:
|
if count == 1:
|
||||||
|
|
|
@ -208,7 +208,7 @@ def __unionPosition(comment, place, parameter, prefix, suffix, count, where=PAYL
|
||||||
|
|
||||||
unionErrorCase = kb.errorIsNone and wasLastRequestDBMSError()
|
unionErrorCase = kb.errorIsNone and wasLastRequestDBMSError()
|
||||||
|
|
||||||
if unionErrorCase:
|
if unionErrorCase and count > 1:
|
||||||
warnMsg = "combined UNION/error-based SQL injection case found on "
|
warnMsg = "combined UNION/error-based SQL injection case found on "
|
||||||
warnMsg += "column %d. sqlmap will try to find another " % (position + 1)
|
warnMsg += "column %d. sqlmap will try to find another " % (position + 1)
|
||||||
warnMsg += "column with better characteristics"
|
warnMsg += "column with better characteristics"
|
||||||
|
@ -273,7 +273,7 @@ def __unionTestByCharBruteforce(comment, place, parameter, value, prefix, suffix
|
||||||
warnMsg += "forcing the "
|
warnMsg += "forcing the "
|
||||||
warnMsg += "back-end DBMS (e.g. --dbms=mysql) "
|
warnMsg += "back-end DBMS (e.g. --dbms=mysql) "
|
||||||
|
|
||||||
if not all([validPayload, vector]):
|
if not all([validPayload, vector]) and not warnMsg.endswith("consider "):
|
||||||
singleTimeWarnMessage(warnMsg)
|
singleTimeWarnMessage(warnMsg)
|
||||||
|
|
||||||
return validPayload, vector
|
return validPayload, vector
|
||||||
|
|
Loading…
Reference in New Issue
Block a user