call for help

Chris Benson chrisb at jesmond.demon.co.uk
Wed Oct 30 17:02:00 CST 2002


On Wed, Oct 30, 2002 at 10:03:15PM +0000, jimf at nunthorpe.co.uk wrote:
> need to know if there are any usenet groups dealing with Win32 extensions, I want to get all machine names and ip addresses from the school domain.

Not sure if you meant Perl Win32 extensions: http://www.perlmonks.org/
seems to deal with with them frequently ... I've not used the Win32::*
modules.

My thought would be (if there is DNS working) to do a

	use Socket;	# for AF_INET
	foreach my $n (1..254) {
		my $ip = "$network.$n";
		my $name = gethostbyaddr(inet_aton($ip),AF_INET))
		print $name;
	}

Mmmm searching for DNS at http://www.perlmonks.org/ returns
http://www.perlmonks.org/index.pl?node_id=195099.

If you don't have DNS and are using MS networking ... uhm, I've done
this from a Linux box:
	foreach my $n (1..254) {
		my $ip = "$network.$n";
		system 'smbclient', '-L', '-N', $ip;
	}

to try connecting to each machine in turn and seeing what *they* think
they're called (not always what other machines think they are!).

Best wishes
-- 
Chris Benson



More information about the Tyneside-pm mailing list