At 02:08 PM 2/22/2004, Olaf Hoyer wrote:
On Sun, 22 Feb 2004, Marty Landman wrote:

> So the arp cache doesn't have nodes on it which it hasn't had activity from
> for a time?

Yes.

I struck out with upgrading nmap to 3.50 as well, and wanting to learn a little about shell scripting wrote this [doubtless poor example but I am a newbie to unix shells] which does work on my lan - taking about 15 seconds wall time to complete.


$ ./findIps
preparing pings
start pinging
1 is on the network
3 is on the network
7 is on the network
160 is on the network
240 is on the network
End of story

$ more findIps
#!/bin/bash

pingEm()
{
        echo "preparing pings"
        for((i=1;i<255;i++))
        do
                echo "ping -c1 192.168.0.$i > $$/$i &" >> pingEmAll.$$
        done
        echo "start pinging"
        chmod +x pingEmAll.$$ && `./pingEmAll.$$`
}

findEm()
{
        for((i=1;i<255;i++))
        do
                awk '/64 bytes from /' $$/$i > ans
                awk '{ print length($0) }' ans > len
                if [ `more len` ]
                then
                        echo "$i is on the network"
                fi
        done
}

mkdir $$ && pingEm
findEm
rm -r $$ & rm pingEmAll.$$ ans len

echo End of story
$


Marty Landman Face 2 Interface Inc. 845-679-9387
FormATable DB: http://face2interface.com/Products/FormATable.shtml
Make a Website: http://face2interface.com/Home/Demo.shtml
Free Formmailer: http://face2interface.com/Products/Formal.shtml


_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to