470,618 Members | 1,710 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,618 developers. It's quick & easy.

Remote mac address

Anyone knows how having the IP address of a host on the lan could I get
the mac address of that hosr?
p/d: Parsing the output of arp -a is not an option.

Thanks a lot!

Jun 27 '08 #1
3 2374
Matias Surdi wrote:
Anyone knows how having the IP address of a host on the lan could I get
the mac address of that hosr?

p/d: Parsing the output of arp -a is not an option.
But the ARP table is exactly what you need to access. This is probably
system-specific.

You could also try to send ARP requests yourself:
http://www.secdev.org/projects/scapy/
http://www.ibm.com/developerworks/ai...y/au-pythocli/

Ciao, Michael.
Jun 27 '08 #2
Michael Stro"der wrote:
Matias Surdi wrote:
>Anyone knows how having the IP address of a host on the lan could I get
the mac address of that hosr?

p/d: Parsing the output of arp -a is not an option.

Any reason why arp is not an option?
But the ARP table is exactly what you need to access. This is probably
system-specific.

You could also try to send ARP requests yourself:
http://www.secdev.org/projects/scapy/
http://www.ibm.com/developerworks/ai...y/au-pythocli/

Ciao, Michael.
Jun 27 '08 #3
Matias Surdi <ma*********@gmail.comwrote:
Anyone knows how having the IP address of a host on the lan could I get
the mac address of that hosr?
p/d: Parsing the output of arp -a is not an option.

What kind of system?

On linux and probably several other unix-like systems you could (if
you had permission) parse the /proc/net/arp file. Granted this isn't
terribly far off from parsing the output of 'arp -a', but at least
it keeps you from spawning a shell to run the 'arp -a' in.
--
Frank Stutzman
Jun 27 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Just D. | last post: by
reply views Thread by Bennett Haselton | last post: by
5 posts views Thread by Mitya Mitriev | last post: by
2 posts views Thread by Tor Inge Rislaa | last post: by
1 post views Thread by =?Utf-8?B?QWdlbmR1bQ==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.