Home » Linux, Tools

BASH Port scanner: piccolo ed efficace

25 Novembre 2006 No Comment

Quello che vi illustrerò è un semplice ma validissimo port scanning realizzato in Bash script per Linux/Unix.
L’autore è Luke Bonanomi e questo piccolo applicativo risulta molto utile in tutti quei casi in cui non sia installato alcun compilatore C nella distribuzione o eventuali tools di port scanning.

Ecco il codice:

#!/bin/bash
for a in $(yes scan | head -1024)
do
(( start++ ))
if [[ -n $(echo '' > /dev/$2/$1/$start && echo "up") ]];
then
echo "Port $start" >> scan;
fi
done;
clear
cat scan;
rm scan;

Questo script va eseguito invocando sotto Unix/Linux:
./scriptname hostname type
dove type può essere tcp o udp. Tale script effettua uno scan nel range di porte 1-1024, modificabile a proprio piacimento ridefinendo opportunamente il comando: head -1024


Technorati : , ,

Social bookmarking:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • De.lirio.us
  • digg
  • Furl
  • Ma.gnolia
  • Spurl
  • YahooMyWeb

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.