Created
June 18, 2013 20:37
-
-
Save avraampiperidis/5809127 to your computer and use it in GitHub Desktop.
nmap scan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# usage .txt file with ip - hostnames one per line | |
#requires root | |
my @ports = (20, 21, 22, 80, 443, 445); #add tcp ports here. | |
print "\nService version 7 status\n"; | |
print "\===============================\n"; | |
while (defined($ipaddr = <>)) { | |
chomp ($ipaddr); | |
print "$ipaddr:\n\n"; | |
$nmap = "echo QUIT | nmap -sS -O $ipaddr $ports"; | |
system ("$nmap"); | |
print "=================================================\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment