Skip to content

Instantly share code, notes, and snippets.

@kjagiello
Last active November 2, 2015 10:58
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 kjagiello/03ceca533d5786952b0a to your computer and use it in GitHub Desktop.
Save kjagiello/03ceca533d5786952b0a to your computer and use it in GitHub Desktop.
#!/bin/bash
for name in $(cat domains.txt);do
host $name | rev | cut -d ' ' -f 1 | rev | grep -E '[0-9]+\.[0-9]+'
done
#!/bin/bash
for ip in $(cat server-ips.txt);do
ping -c 1 $ip | grep -B 2 '1 packets received' | grep 'statistics' | cut -d ' ' -f 2
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment