天道酬勤,学无止境

python-netifaces

scapy - srp 没有将我的数据包发送到正确的网络接口(scapy - srp doesnt send my packet to the correct network interface)

问题 我在 Windows 10 机器上工作,我正在为我正在做的一些项目使用 scapy。 当我使用嗅探功能从我的以太网接口嗅探数据包时,它按预期工作,但是当我使用 srp1 从同一接口发送数据包时,它通过我的 vEthernet 接口发送我的数据包,而不是通过我的物理以太网接口(所以数据包永远不会到达目的地)。 这是我的嗅探与 srp1 的代码: a = sniff(count = 1, iface = "Ethernet") p = srp1(pkt, iface = "Ethernet") 正如您在两次调用中看到的那样,我使用了“以太网”接口名称。 有人可以告诉我该怎么做,这样我的数据包将通过以太网而不是 vEthernet 发送吗? 回答1 如果您打开 Scapy shell 并输入IFACES (仅限 Windows ATM),您将看到确切的接口列表。 然后您可以使用接口对象,而不是名称。 (有关各种 util 函数,例如IFACES.dev_from_id() ...,请参阅help(IFACES)以获取它)。 例子: from scapy.arch.windows import IFACES a = IFACES.dev_from_id(5) sr1(IP(dst="www.google.com")/ICMP(), iface=a) 另见https:/

2021-10-25 14:48:03    分类:技术分享    python   scapy   python-netifaces

scapy - srp doesnt send my packet to the correct network interface

I work on windows 10 machine and I am using scapy for some project I am doing. When I use the sniff function to sniff packets form my ethernet interface it is working as expected but when I use srp1 to send packet from the same interface it send my packet trough my vEthernet interface and not trough my physical ethernet interface(so the packet never gets to it destination). Here is my code of sniff versus srp1: a = sniff(count = 1, iface = "Ethernet") p = srp1(pkt, iface = "Ethernet") as you can see in both calls I use "Ethernet" interface name. Can someone tell me what to do so my packet will

2021-09-06 05:22:56    分类:问答    python   scapy   python-netifaces

Why is 'pip3 install netifaces' failing on Debian 10 Buster?

I setup a new Debian 10 (Buster) instance on AWS EC2, and was able to install a pip3 package that depended on netifaces, but when I came back to it the next day the package is breaking reporting an error in netifaces. If I try to run pip3 install netifaces I get the same error: ~$ pip3 install netifaces Collecting netifaces Using cached https://files.pythonhosted.org/packages/0d/18/fd6e9c71a35b67a73160ec80a49da63d1eed2d2055054cc2995714949132/netifaces-0.10.9.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module>

2021-04-03 15:46:08    分类:问答    pip   debian   python-netifaces