Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $web = Invoke-WebRequest -Method Get -Uri "https://ipv4.icanhazip.com/"
  2. $ip = $web.Content
  3. $hostname = "server01.llama.se"
  4. $user = "llama.se"
  5. $pass = "bllllllaaahg"
  6.  
  7. $pair = "${user}:${pass}"
  8. $bytes = [System.Text.Encoding]::ASCII.GetBytes($pair)
  9. $base64 = [System.Convert]::ToBase64String($bytes)
  10. $basicAuthValue = "Basic $base64"
  11. $headers = @{ Authorization = $basicAuthValue }
  12.  
  13.  
  14. Invoke-WebRequest -Method Post -Uri "https://dyndns.loopia.se?hostname=$hostname&MyIP=$ip" -Headers $headers
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement