Nmap Development mailing list archives

Re: Portscanner with no installer?


From: Vlatko Kosturjak <kost () linux hr>
Date: Sat, 23 Aug 2008 14:49:45 +0200

I'd still like to find something similar for Linux, though. nmap is
nice, but requires some libraries to be installed (maybe it's possible
to do it all without root, I'm not really sure?) 

Little Perl golfing can help you in Unix/Linux case (actually any OS
which have Perl, even Windows - but not by default). Of course, if Perl 
is fine with you :) 

This is simple oneliner(?) to scan all ports on localhost using TCP connect
scan:
perl -MIO::Socket -e 'for($i=1;$i<65536;$i++) { if (my
$s=IO::Socket::INET- >new(PeerAddr=>$ARGV[0],PeerPort=>$ i,Proto
=>'tcp')) { print "$i "; close ($s); } } print "n";' localhost 

If you interested more, feel free to take a look at my Perl presentation
about few tips for pentesters:
http://www.slideshare.net/kost/perl-usage-in-security-and-penetration-testing

Hope it helps,
-- 
Vlatko Kosturjak - KoSt                                  ICQ: 3631122

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: