Advertisement
Guest User

NO-IP BASH API Client for Linux

a guest
Mar 31st, 2017
978
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.54 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. ## EDIT FOR CONFIG ##
  4. HOST="yourhost"
  5. USER="youruser"
  6. PASSWORD="yourpasswd"
  7.  
  8. ## DO UPDATE ##
  9. REAL_IP=$(GET https://api.ipify.org/ | grep -E -o "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)")
  10. QUERY=$(curl -s -k -A "NO-IP Private BASH Client for Linux/v1.1 yourmail@gmail.com" "https://$USER:$PASSWORD@dynupdate.no-ip.com/nic/update?hostname=$HOST&myip=$REAL_IP" )
  11.  
  12. ## PRINT REPLY ##
  13. echo "[NO-IP Reply] $HOST $QUERY"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement