mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 14:55:40 +00:00
Cleaning a mess with stacked queries and pre-WHERE boundaries
This commit is contained in:
parent
a5e3dce26f
commit
35d9ed8476
6 changed files with 89 additions and 49 deletions
|
|
@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
|||
from lib.core.enums import OS
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.2.9.22"
|
||||
VERSION = "1.2.9.23"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ See the file 'LICENSE' for copying permission
|
|||
"""
|
||||
|
||||
import os
|
||||
import re
|
||||
|
||||
from xml.etree import ElementTree as et
|
||||
|
||||
|
|
@ -17,6 +18,9 @@ from lib.core.exception import SqlmapInstallationException
|
|||
from lib.core.settings import PAYLOAD_XML_FILES
|
||||
|
||||
def cleanupVals(text, tag):
|
||||
if tag == "clause" and '-' in text:
|
||||
text = re.sub(r"(\d+)-(\d+)", lambda match: ','.join(str(_) for _ in xrange(int(match.group(1)), int(match.group(2)) + 1)), text)
|
||||
|
||||
if tag in ("clause", "where"):
|
||||
text = text.split(',')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue