get IPs at a LAN

X

xanoutas

Hi everybody!!I need to find a way to automatically get all the IPs
from a small LAN.?Any ideas?Thanx in advance...:)
 
L

Luc The Perverse

xanoutas said:
Hi everybody!!I need to find a way to automatically get all the IPs
from a small LAN.?Any ideas?Thanx in advance...:)

Um . . . Just keep making DHCP requests?
 
A

Alex Molochnikov

Open a socket on a well-known port on each of the hosts in your LAN. If this
is a small LAN, most likely it will be type C network, with up to 254 hosts.
So, start with the host 1, and loop over:
192.168.1.1
192.168.1.2
....
192.168.1.254

(e.g. if your network IP starts with 192.168.1), and see if the socket
throws an exception. To speed things up, you can open 254 sockets at the
same time in asynchronous threads.

Alex Molochnikov
Gestalt Corporation
 
C

Chris Uppal

Alex said:
Open a socket on a well-known port on each of the hosts in your LAN. If
this is a small LAN, most likely it will be type C network, with up to
254 hosts. So, start with the host 1, and loop over:
192.168.1.1
192.168.1.2
...
192.168.1.254

But tell your sysadmin/security people that you are going to be running a scan
first, or you'll likely find yourself politely, but firmly, kicked off the
premises...

-- chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top