Skip to content

Instantly share code, notes, and snippets.

@relrod
Created September 17, 2018 16:19
Show Gist options
  • Save relrod/3eed6961f2d6971be3581caeb001ae3f to your computer and use it in GitHub Desktop.
Save relrod/3eed6961f2d6971be3581caeb001ae3f to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
for ip in $(echo 150.134.{0..255}.{0..255}); do
echo $ip
ping -W 1 -c 1 $ip
if [[ $? -eq 0 ]]; then
echo $ip >> ips.used
else
echo $ip >> ips.error
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment