Quick Scanner (Host/Port)

Sep 28
2008
#!/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

Comments are closed.

Calendar

September 2008
M T W T F S S
« Aug   Oct »
1234567
891011121314
15161718192021
22232425262728
2930  

Tags