Skip to content

Instantly share code, notes, and snippets.

@gzmask
Created June 15, 2010 17:43
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 gzmask/439418 to your computer and use it in GitHub Desktop.
Save gzmask/439418 to your computer and use it in GitHub Desktop.
ips = Array.new
ips.push '192.168.13.201'
ips.push '192.168.13.202'
ips.push '192.168.13.206'
ips.push '192.168.13.205'
ips.push '192.168.13.211'
ips.push '192.168.13.209'
ips.push '192.168.13.210'
ips.push '192.168.13.217'
ips.push '192.168.13.216'
ips.push '192.168.13.215'
ips.push '192.168.13.221'
ips.push '192.168.13.220'
ips.push '192.168.13.224'
ips.push '192.168.13.223'
ips.push '192.168.13.227'
ips.push '192.168.13.229'
ips.push '192.168.13.231'
ips.push '192.168.13.230'
ips.push '192.168.13.235'
ips.push '192.168.13.236'
ips.push '192.168.13.245'
ips.push '192.168.13.242'
ips.push '192.168.13.241'
ips.push '192.168.13.234'
ips.push '192.168.13.222'
ips.each do |ip|
fork do
cmd = `nc -z -nvv -w 1 #{ip} 20-25 |tee`
puts cmd
end
end
Process.waitall
#ruby portscan.rb >> portscan.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment