Skip to content

Instantly share code, notes, and snippets.

@akirayou
Created January 16, 2019 23:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akirayou/faf9d05d681a0aec4f64536bb866a8f4 to your computer and use it in GitHub Desktop.
Save akirayou/faf9d05d681a0aec4f64536bb866a8f4 to your computer and use it in GitHub Desktop.
#!/bin/sh
ID="お名前.comのID"
PW="パスワード"
IP=`curl -s 'https://api.ipify.org?format=txt'`
(
sleep 1 ;
echo "LOGIN";
echo "USERID:${ID}";
echo "PASSWORD:${PW}";
echo ".";
sleep 1;
echo "MODIP";
echo "HOSTNAME:SOME_YOURE_HOST_PART_ONLY";
echo "DOMNAME:YOURE.DOMAIN";
echo "IPV4:${IP}";
echo ".";
sleep 1;
echo "LOGOUT";
echo ".";
)|openssl s_client -connect ddnsclient.onamae.com:65010 -quiet  >/dev/null 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment