Skip to content

Instantly share code, notes, and snippets.

@king6cong
Last active March 8, 2018 12:11
Show Gist options
  • Save king6cong/d8667fb3f89ffa4b6b7deaa0aaff495e to your computer and use it in GitHub Desktop.
Save king6cong/d8667fb3f89ffa4b6b7deaa0aaff495e to your computer and use it in GitHub Desktop.
# sync_bin ssl.sh tiger@10.3.16.137
# brew install gawk first on macOS
mkdir -p ~/log
while true; do
# curl -sS https://api.zjurl.cn/dns 2>&1 >> ~/log/ssl-host; echo >> ~/log/2ssl-host
# curl -sS https://123.58.9.80/dns -k -H 'Host: api.zjurl.cn' 2>&1 >> ~/log/ssl-ip; echo >> ~/log/ssl-ip
curl -sS https://api.zjurl.cn/dns 2>&1 | gawk '{ print strftime("[%Y-%m-%d %H:%M:%S]"), $0 }' 2>&1 >> ~/log/ssl-host-t
curl -sS https://123.58.9.80/dns -k -H 'Host: api.zjurl.cn' 2>&1 | gawk '{ print strftime("[%Y-%m-%d %H:%M:%S]"), $0 }' 2>&1 >> ~/log/ssl-ip-t
sleep 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment