在 python 中使用 scapy 进行反向 dns 查找 [英] Reverse dns lookup with scapy in python
本文介绍了在 python 中使用 scapy 进行反向 dns 查找的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在 Python 中使用 scapy
进行反向 DNS 查找?我在 Google 中寻找它,但找不到与此主题相关的内容.
How can I do reverse DNS lookup using scapy
in Python? I look for it in Google but I couldn't find related to this topic.
推荐答案
好的.我找到了我的答案,我想在这里分享,因为有人可以寻找同样的东西.一行代码足以在scapy中进行反向dns查询,即:
Ok. I have found my answerm and I want to share it in here, because someone could look for same thing. One line of code is enough to make a reverse dns query in scapy, which is:
sr1(IP(dst="8.8.8.8")/UDP()/DNS(rd=1,qd=DNSQR(qname="211.196.59.69.in-addr.arpa", qtype='PTR')))
这篇关于在 python 中使用 scapy 进行反向 dns 查找的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文