Skip to content

Instantly share code, notes, and snippets.

@erubboli
Last active December 11, 2015 21:59
Show Gist options
  • Save erubboli/4666625 to your computer and use it in GitHub Desktop.
Save erubboli/4666625 to your computer and use it in GitHub Desktop.
0.upto(255) do |n|
ip = "192.168.2.#{n}"
printf "ping #{ip}"
`ping -c 1 -q -o -t 1 #{ip} 2>/dev/null`
if $?.to_i == 0
printf " ok "
end
printf "\n"
end
@erubboli
Copy link
Author

just because u don't have and cant install nmap :|

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment