Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommand to Listen on UDP port 53 #9

Open
zjlywjh001 opened this issue Apr 13, 2021 · 0 comments
Open

Recommand to Listen on UDP port 53 #9

zjlywjh001 opened this issue Apr 13, 2021 · 0 comments

Comments

@zjlywjh001
Copy link

zjlywjh001 commented Apr 13, 2021

...
# listen for DNS query
    log('Listening for DNS queries...')
    udpserver = socket. socket(socket.AF_INET, socket.SOCK_DGRAM)  
    udpserver.bind(('0.0.0.0',53)) #listen to 53 port

    while True: dns_listener = sniff(filter='udp dst port 53', iface=args.interface, prn=dns_handler)

Recommand to add two line in the code to listen to udp port 53 .Because if we don't listen 53 port ,the kernel will always reply a "Destination Unreachable" packet to the client which will cause data transfering not stable.
icmp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant