[bash]: IP Discover Script

Need help with C, C++, perl, python, etc?

[bash]: IP Discover Script

Postby HyperY2K » 2007-01-22 13:29

I've got a problem with an old router. This router has DHCP disabled and the hardware reset won't work.
So I've got to found the correct IP address by trying each one (192.169.x.y ones). I've thought on a shell script.
Did anyone have an idea?
HyperY2K
 
Posts: 25
Joined: 2006-06-19 22:15

Postby mzilikazi » 2007-01-22 14:21

My router is 192.168.11.1. So you could scan the network w/ nmap something like so:
Code: Select all
nmap 192.168.11.0/24


That shows you every i.p. on the subnet.
Debian Sid Laptops:
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G
User avatar
mzilikazi
Forum Ninja
 
Posts: 3321
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

Postby Guest » 2007-01-22 14:44

so , do you have an idea how this would work in a bash-script with a for-loop to "scan" across 192.168.0.0 until 192.168.255.0 networks?
Guest
 

Postby plugwash » 2007-01-22 18:45

if you know its in 192.168 just set the subnet mask on your interface to 255.255.0.0 and then do nmap 192.168.0.0/16

it'll take a while though

also if the hardware reset isn't working then it seems pretty likely that the unit may simply be dead
plugwash
 
Posts: 2508
Joined: 2006-09-17 01:10


Return to Programming

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable