Comments (2)
Hehe, you are always testing some weird apps =). It's a one off hack, so here is how I would recommend you modify "proxyrequest" to do this:
- Force it to use TCP instead of the default UDP for upstream servers:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((host, int(port))) request = udp2tcp(request); // see below sock.sendall(request); reply = sock.recv(1024); reply = tcp2udp(reply); // see below sock.close()
- Now you also need to convert between udp and tcp versions of dns packets.
tcp2udp() is easy. Just chop off the first 2 bytes of the reply from the TCP server to get a UDP packet:
return packet[2:]
udp2tcp() requires you to prepend a 2 byte message length (as per RFC 1035), try something like this:
return struct.pack("B",len(packet)) + packet
from dnschef.
Implemented TCP support for remote nameservers using the 4.2.2.2#53#tcp format. Please test if you have some free time.
from dnschef.
Related Issues (20)
- Failed to open log file for writing, HOT 7
- Unexpected Error:
- Two or more records per domain HOT 3
- "Could not proxy request: timed out" for 99% responses
- Proxying problem HOT 3
- Ability to turn off answers for ANY HOT 3
- TypeError with --truedomains HOT 1
- Can't run dnschef.py HOT 5
- Syntax Errors HOT 3
- Multiple SRV records with different port and target not allowed HOT 5
- dnslib.dns.DNSError: QTYPE: Invalid forward lookup: [65] HOT 1
- -q still give output for everything
- Question: filter or reject unwanted query HOT 1
- Does this tool support 0x20 encoding?
- Seeking to update DNSChef.exe from version 0.3 to version 0.4.6.2
- No permission HOT 1
- Error using ngrok to defeat hostname verification HOT 4
- Support of SRV records HOT 8
- [Errno 98] Address already in use
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dnschef.