scaning the local network with arping/sh script

Alex Soares de Moura alex at
Sun Apr 24 22:16:08 PDT 2005

Abu Khaled wrote:

>On 4/24/05, Alex Soares de Moura <alex at> wrote:
>>Abu Khaled wrote:
>>>I don't know much about scripting but i tried to write one to scan my
>>>local network using the net/arping port.
>>>here is the script:
>>><sciprt start>
>>>while [ $IP -le 20 ]
>>>echo -e ".\c"
>>>  if ( arping -c 1 -q -i rl1 10.0.0.$IP ) then
>>>     echo -e "\n10.0.0.$IP Online"
>>>  fi
>>>IP=$(( $IP +1 ))
>>>echo -e "\n"
>>><script end>
>>>The script runs and reports OK but it is very slow and takes a lot of
>>>time to scan a large network. Does anyone have an idea on how to
>>>improve it or provide an alternate way to do it?
>>>PS: I used the arpscan port in the past but it is reported as broken:
>>>     I'm running FreeBSD 5.4 Stable.
>>Have you tried the ettercap tool? It's in the ports:
>>Best regards,
>Thanks Alex. Ettercap is a nice tool but I don't run X on my Gateway/Servers.
Neither do I. :-)  Now I know ettercap has a GUI...
I've just checked the website and - gladly - the 
isn't the only interface option. From the website: "Running Ettercap: 
You need
to select a user interface (no default) using -T for Text only, -C for
the Ncurses based GUI, or -G for the nice GTK2 interface."

Building it the way you want:
# cd /usr/ports/net-mgmt/ettercap
# make

You may use the following build option(s):

WITHOUT_GTK=yes     builds without GTK2+ GUI
WITHOUT_ICONV=yes   builds without support for UTF-8
WITHOUT_PCRE=yes    builds without support for perl regexps in filters
WITHOUT_PLUGINS=yes builds without ettercap plugins
WITHOUT_SSL=yes     builds without support for SSH1 and SSL decryption

Good packet hunting,


More information about the freebsd-net mailing list