From: Tom Anderson on
On Wed, 23 Jul 2008, BigZero wrote:

> On Jul 23, 6:05�pm, Tom Anderson <t...(a)urchin.earth.li> wrote:
>
>> But it is possible to do it without running *any code at all* on the
>> remote machine - you can get the remote machine's MAC address from your
>> own local ARP cache.
>>
>> Here's a script to do it under unix:
>>
>> #! /bin/bash
>> addr=$1
>> arp -a | grep $addr | cut -d " " -f 4
>
> Well this script not worked for me
> it gives error arp: command not found
> i try this on the Linux 2.6.11-1.1369_FC4 i686 athlon i386 GNU/Linux

I would guess the arp command isn't on your path. It is on my Mac, but
i've just tried on a linux box (i think it's Debian), and it isn't on
that.

So, instead, find your arp command and invoke it with its full path.
Mine's at:

/usr/sbin/arp

If yours isn't, try:

locate */arp

And look for likely candidates.

tom

--
We can only see a short distance ahead, but we can see plenty there that
needs to be done. -- Alan Turing
From: Lew on
BigZero wrote:
>> i [sic] try this on the Linux 2.6.11-1.1369_FC4 i686 athlon i386 GNU/Linux

Tom Anderson wrote:
> I would guess the arp command isn't on your path. It is on my Mac, but
> i've just tried on a linux box (i think it's Debian), and it isn't on that.
>
> So, instead, find your arp command and invoke it with its full path.
> Mine's at:
>
> /usr/sbin/arp
>
> If yours isn't, try:
>
> locate */arp
>
> And look for likely candidates.

/usr/sbin on Fedora is in the root path but not by default in a user path. In
that it is the opposite of ./

--
Lew