Created
May 28, 2015 13:26
-
-
Save oliveagle/db0626edd79f98d810be to your computer and use it in GitHub Desktop.
curl_iplist.sh
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 | |
# | |
# curl_iplist.sh | |
# Copyright (C) 2015 oliveagle <[email protected]> | |
# | |
# Distributed under terms of the MIT license. | |
# | |
if [ "$#" -ne 1 ]; then | |
echo "curl_iplist.sh iplist.txt" | |
exit 2 | |
fi | |
for i in `cat $@`; | |
do | |
url="http://$i:63000/serveragent/serveragent.asmx" | |
echo -n "$url $i " ; curl --connect-timeout 3 -m 3 -s -I "$url" | head -n1 |cut -d" " -f 2; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment