On Sep 9, 11:56 am, [EMAIL PROTECTED] wrote:
> On Sep 9, 8:46 am, [EMAIL PROTECTED] (Ken Foskey) wrote:
>
> > On Sat, 2007-09-08 at 16:52 -0700, [EMAIL PROTECTED] wrote:
> > > How would I make a script that gets a list of all the computer names
> > > and ip addresses, internal 192.168..., of the computers attached to my
> > > wired network? Or is there a program that will do this already? Thanks
>
> > Probably a reverse DNS lookup.  I would start with a search.cpan.org on
> > DNS.
>
> > --
> > Ken Foskey
> > FOSS developer
>
> A reverse DNS lookup would find a name based on an ip address I want
> something that finds all computer names (not login names) on a current
> network. If a good way to do this there is not, then how would I find
> the name of the computer from looking at all ip addresses
> 192.168.1.xxx. like how would I know that 192.168.1.105 is comp1 on my
> network?

As long as the name can be resolved via DNS or WINS, nmap will be able
to give you the hostname.
http://insecure.org/nmap/
http://search.cpan.org/search?query=nmap&mode=all

Here's an example:

C:\>nmap -sP 192.168.0.0/24

Starting Nmap 3.95 ( http://www.insecure.org/nmap ) at 2007-09-09
12:58 Pacific Daylight Time
Host 192.168.0.1 appears to be up.
MAC Address: 00:09:5B:18:81:B0 (Netgear)
Host graphic (192.168.0.2) appears to be up.
Host rt.dev.com (192.168.0.10) appears to be up.
MAC Address: 00:11:5B:55:1E:20 (Elitegroup Computer System Co. (ECS))
Host 192.168.0.128 appears to be up.
MAC Address: 00:20:00:18:16:40 (Lexmark International)


If you want to use a Perl script as a front-end to the nmap command,
you'd want to use the Nmap::Scanner module.
http://search.cpan.org/author/MAXSCHUBE/Nmap-Scanner-1.0/lib/Nmap/Scanner.pm


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to