I use socket module in python to connect to dns server on a router.The connection is succesful and if I send a message I get a blank reply but what are commands that I can write to dns server?
Router is a Huawei Hg552e
gateway: 192.168.1.1
dns server port: 53
The commands are not clear-text, so you need to read the protocol specification and implement it, or use a library that already implements that for you, for example, PyUnbound .
See RFC 1035 - DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.