Or you could look at the Transport section of Win32::Lanman.

--Chuck


--- "Doughty, Matt" <[EMAIL PROTECTED]> wrote:
> heh... one way that you can do this. though certainly not the most elegant solution.
> You should be able to use a combination of nslookup, ping, and arp to get your 
>answers;
> this assumes an NT workstation.
> you can use nslookup to get the ip address of the host. Then you can ping the host 
> putting an entry in the arp table of IP to MACAddress. After that you parse the 
>output of 
> arp -a to get the MACAddress.  oh what the heck...
> ----
> #it works on my machine! :)
> chomp(my $host = shift);
> chomp($ip = (grep{s/.*\[([\d\.]+)\].*/$1/} `ping $host`)[0]);
> $mac = (grep{s/.+$ip\s+([\d\w-]+)\s.*/$1/}`arp -a`)[0];
> print $mac . "\n";
> 
> //Matt


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin

Reply via email to