Quick Scanner (Host/Port)
Sep 28
2008
2008
Comments Off
#!/usr/bin/ruby host_port = ARGV[0] host = host_port.split(':').first port = host_port.split(':').last puts %x[nmap -p #{port} #{host}]
Or just:
#!/usr/bin/ruby puts %x[nmap -p #{ARGV[0].split(':').reverse.join(' ')}]
Usage (cli and given that the script is named scan_proxy):
./scan_proxy 202.105.182.87:808