Collin Anderson
Collin Anderson

Reputation:

How do I send an ARP packet through python on windows without needing winpcap?

Is there any way to send ARP packet on Windows without the use of another library such as winpcap?

I have heard that Windows XP SP2 blocks raw ethernet sockets, but I have also heard that raw sockets are only blocked for administrators. Any clarification here?

Upvotes: 3

Views: 5564

Answers (2)

Mihai Limbășan
Mihai Limbășan

Reputation: 67786

There is no way to do that in the general case without the use of an external library.

If there are no requirements on what the packet should contain (i.e., if any ARP packet will do) then you can obviously send an ARP request if you're on an Ethernet network simply by trying to send something to any IP on your own subnet (ensuring beforehand that the destination IP is not in the ARP cache by running an external arp -d tar.get.ip.address command), but this will probably not be what you want.

For more information about raw socket support see the TCP/IP Raw Sockets Docs page, specifically the Limitations on Raw Sockets section.

Upvotes: 3

bot47
bot47

Reputation: 1524

You could use the OpenVPN tap to send arbitrary packets as if you where using raw sockets.

Upvotes: 0

Related Questions