ARP requests

N

ninny

Hello,

I have a project to do in ruby witch consist in recover the ARP requests
(who-has) on my local network and take the IP address if nobody answer
to the ARP requests.
I know identify an ARP request with "pcap" but I don't know how to take
the IP address.

If someone want help me, I would be very happy
 
R

Robert Klemme

I have a project to do in ruby witch consist in recover the ARP requests
(who-has) on my local network and take the IP address if nobody answer
to the ARP requests.
I know identify an ARP request with "pcap" but I don't know how to take
the IP address.

I am not sure where your problems are but if you want to detect an IP
address you can take this regexp for a start:

/\d{1,3}(?:\.\d{1,3}){3}/

Note that it does not match IPv6 addresses which might or might not be
an issue. Note also, that it might match strings that are not IP addresses.

Kind regards

robert
 
R

Rick DeNatale

Not really sure about how you'd do this in ruby, but I have a
suggestion, if you are trying to monitor ARP requests on the network
and also ARP replies I am afraid, you'd not see most (infact all
except your own) of the ARP replies (standards compliant ARP replies
are not sent to broadcast MAC address) and you might end up thinking
nobody replied.

Not sure how to do this from Ruby, but you can put the network adapter
into promiscuous mode. This causes the adapter to pass all traffic
into the OS, not just traffic addressed to the machine. This is how
tools like ethereal do this.
 
E

Eivind Eklund

into promiscuous mode. This causes the adapter to pass all traffic
into the OS, not just traffic addressed to the machine. This is how
tools like ethereal do this.

pcap will put the interface into promiscuous mode.

The problem is that switches will not forward the traffic.

Unfortunately, I don't know any real solution to the problem.

Eivind.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top