Skip to content

Instantly share code, notes, and snippets.

@andreafortuna
Created April 14, 2017 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreafortuna/ab386f11d12d5305c069193f6680b25a to your computer and use it in GitHub Desktop.
Save andreafortuna/ab386f11d12d5305c069193f6680b25a to your computer and use it in GitHub Desktop.
One-Line Perl Portscanner
#!/usr/bin/perl
use IO::Socket;for ($i=1;$i<65536;$i++) { if (my $s=IO::Socket::INET->new(PeerAddr=>$ARGV[0],PeerPort=>$i,Proto=>'tcp') ) { print "$i\n";close ($s); }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment