Advertisement
Guest User

Untitled

a guest
Feb 3rd, 2019
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.89 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. user=me
  4. pass=password
  5. host=porkbun.com
  6. domain="domain.tld"
  7.  
  8. _reqjson="{ \
  9.     \"loginUsername\": \"${user}\", \
  10.     \"loginPassword\": \"${pass}\" \
  11.     }"
  12.  
  13. get_cookie=$(curl \
  14.         --header "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" \
  15.         --header "Content-Type: application/json" \
  16.         --data-binary "$_reqjson" \
  17.         --header "Connection: keep-alive" "https://${host}/account/login" \
  18.         -v -L 2>&1)
  19.  
  20. eval $(echo ${get_cookie} | grep -o -P 'BUNSESSION2=.*?;' | sed 's/.$//')
  21.  
  22. for dom_pack in ${domain}
  23. do
  24.     curl \
  25.         --header "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" \
  26.         --header "Cookie: BUNSESSION2=${BUNSESSION2}" \
  27.         --header "Connection: keep-alive" "https://${host}/account/${dom_pack}?download=1" \
  28.         -o "${dom_pack}.zip" \
  29.         -L
  30. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement