it is easy to make it as a small port scanner
require "ping"
if ARGV.length != 3
puts "Usage: pingb machine_domain min max"
exit 0
end
for port in (ARGV[1].to_i..ARGV[2].to_i) do
if Ping.pingecho(ARGV[0],1,port) then
puts "Port #{port} open"
end
end
$ruby pingecho.rb slashdots.org 80 100
Port 80 open
No comments:
Post a Comment