Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b475a38

Browse files
committed
Better ORDER BY detection
1 parent 42de887 commit b475a38

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.revision import getRevisionNumber
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.0.5.56"
22+
VERSION = "1.0.5.57"
2323
REVISION = getRevisionNumber()
2424
STABLE = VERSION.count('.') <= 2
2525
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")

lib/techniques/union/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def _orderByTest(cols):
5353
query = agent.suffixQuery(query, suffix=suffix, comment=comment)
5454
payload = agent.payload(newValue=query, place=place, parameter=parameter, where=where)
5555
page, headers = Request.queryPage(payload, place=place, content=True, raise404=False)
56-
return not re.search(r"(warning|error|order by|failed)", page or "", re.I) and comparison(page, headers) or re.search(r"data types cannot be compared or sorted", page or "", re.I)
56+
return not any(re.search(_, page or "", re.I) and not re.search(_, kb.originalPage or "", re.I) for _ in ("warning", "error", "order by", "failed")) and comparison(page, headers) or re.search(r"data types cannot be compared or sorted", page or "", re.I)
5757

5858
if _orderByTest(1) and not _orderByTest(randomInt()):
5959
infoMsg = "ORDER BY technique appears to be usable. "

0 commit comments

Comments
 (0)