Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- user=me
- pass=password
- host=porkbun.com
- domain="domain.tld"
- _reqjson="{ \
- \"loginUsername\": \"${user}\", \
- \"loginPassword\": \"${pass}\" \
- }"
- get_cookie=$(curl \
- --header "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" \
- --header "Content-Type: application/json" \
- --data-binary "$_reqjson" \
- --header "Connection: keep-alive" "https://${host}/account/login" \
- -v -L 2>&1)
- eval $(echo ${get_cookie} | grep -o -P 'BUNSESSION2=.*?;' | sed 's/.$//')
- for dom_pack in ${domain}
- do
- curl \
- --header "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" \
- --header "Cookie: BUNSESSION2=${BUNSESSION2}" \
- --header "Connection: keep-alive" "https://${host}/account/${dom_pack}?download=1" \
- -o "${dom_pack}.zip" \
- -L
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement