Welcome to my site. Please CLICK HERE to give your opinions regarding this new look of "PCTipsbyAnu". Thanks for visiting.

Saturday, January 8, 2011

Browse » Home » , , , » Which IP addresses and hostnames are used for wireless clients?

Which IP addresses and hostnames are used for wireless clients?


Here is script that can give the list of IP addresses and hostnames that are used for wireless clients
Note: Only work if you get an IP address from DHCP

SCRIPT :

 # mkdir -p /tmp/www
while [ 1 ];
do
wl assoclist | awk '{print tolower($2)}' > /tmp/assocLIST
# echo "<meta http-equiv="refresh" content="10"><b>Hostnames and IP addresses of WLAN clients</b> (last update: $(date))<p>" > /tmp/www/wlan.html
while read assocLINE
do
dumpleases | awk '/'"$assocLINE"'/ {print "Hostname: " $1, "MAC: " $2, "IP: " $3}'
# echo "<br>";
done < /tmp/assocLIST # >> /tmp/www/wlan.html
sleep 10;
done;
Output:
Hostname: tp MAC: 01:81:18:3d:49:5e IP: 192.168.2.101
You can change the order of "$1, $2, $3" or cut-out:
... awk '{print $1,$3}'
Output:
tp 192.168.2.101



A QUESTIONS FOR YOU :->


"How can I output the signal strength (wl rssi ) at the sametime by feeding MAC Addr from assoclist without typing MAC addr eachtime in telnet?"

 Thanks...
You can leave a response, or trackback from your own site.

About 'Anu': My name is 'Anu' also Known as 'ANU 007 TIGER' .I'm administrator of 'PC Tips by Anu' blog .This blog was opened for sharing contents about hacking n cracking.
Thanks YAHOO OR GMAIL

0 comments:

Post a Comment

 
Back to Top