Created
August 8, 2018 06:36
-
-
Save manasmbellani/d7120573ea5b0b9a194cdc18db9b4fd8 to your computer and use it in GitHub Desktop.
Check live assets via a ping scan. Tested on Kali Linux.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -lt 2 ]; then | |
echo "[-] $0 <assets-list> <out-active-assets-list>" | |
exit | |
fi | |
assets_list="$1" | |
out_active_assets_list="$2" | |
for asset in `cat "$assets_list"`; do | |
echo "[*] Testing asset '$asset'" | |
ping -c1 -w2 "$asset" \ | |
| grep "64 bytes" \ | |
| cut -d" " -f4 \ | |
| tee -a "$out_active_assets_list" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment