View Single Post
  #8   (View Single Post)  
Old 16th August 2008
arch arch is offline
Port Guard
 
Join Date: Jun 2008
Posts: 38
Default

about the arp stuff try arpwatch - it's harvest mac addresses in combination with ip - one drawback is that it omit zeros if you have mac for exmp: 0b:bla:bla ... it print it in the log in form of b:bla:bla.
btw for a week now i try some sh scripting and .. want to share :-p
here it is:

Code:
#!/bin/sh

val=1
count=255

echo input ip range
read ip

while [ $val -le $count ]
do
   echo ping ip $ip.$val
   `/sbin/ping -c 1 $ip.$val > /dev/null 2>&1`
   if echo $?
then
        echo ip is in use
        echo $ip.$val >> used
else
        echo ip is not in use
        echo $ip.$val >> unused
fi
        val=`expr $val + 1`
done
i know..it's lame.. :-p
P.S by ip range i mean..ip block e.g you input 192.168.0 and that's it.. to stop it you have to suspend it.. or killed or whatever..
if use ctr+c well.. you fast though all ip's
__________________
Verbose mode can also be turned on for SSH2 with the (surprise!) VerboseMode keyword.

Last edited by arch; 16th August 2008 at 06:07 PM.
Reply With Quote