python-netifaces

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

Deadly 提交于 2020-12-26 11:21:24
问题 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

Extracting Subnet Mask from my computer python

浪子不回头ぞ 提交于 2020-01-30 08:50:52
问题 Dears I was planning to extract my Subnet mask, I had used the below code but the subnetmask is always 255.255.255.255 which is wrong import socket # Import socket module import netifaces def get_ip_address(): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect(("8.8.8.8", 80)) My_ip=s.getsockname()[0] s.close() return My_ip def main(): #print(netifaces.interfaces()) for i in netifaces.interfaces(): try: # Address print("IP Address: ", netifaces.ifaddresses(i)[netifaces.AF_INET][0]

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

China☆狼群 提交于 2020-01-05 03:46:23
问题 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