Skip to content

Instantly share code, notes, and snippets.

@manasmbellani
Created August 8, 2018 06:36
Show Gist options
  • Save manasmbellani/d7120573ea5b0b9a194cdc18db9b4fd8 to your computer and use it in GitHub Desktop.
Save manasmbellani/d7120573ea5b0b9a194cdc18db9b4fd8 to your computer and use it in GitHub Desktop.
Check live assets via a ping scan. Tested on Kali Linux.
#!/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