Skip to content

Instantly share code, notes, and snippets.

@oliveagle
Created May 28, 2015 13:26
Show Gist options
  • Save oliveagle/db0626edd79f98d810be to your computer and use it in GitHub Desktop.
Save oliveagle/db0626edd79f98d810be to your computer and use it in GitHub Desktop.
curl_iplist.sh
#! /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