Created
December 14, 2018 21:53
-
-
Save kiska3/c3dbde8a7068f417c4c4577abd0aca85 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
URI='http://staff.tumblr.com' | |
UA='ArchiveTeam' | |
CSRF=$(wget -o log --user-agent ${UA} ${URI} -O - | sed -n 's|.*tumblr_form_key" content="\(.*\)">.*"tumblr-gpop.*|\1|p') | |
REF='https://www.tumblr.com/privacy/consent?redirect=http%3A%2F%2Fstaff.tumblr.com%2F' | |
echo "CSRF Token: ${CSRF}" | |
wget --user-agent "ArchiveTeam" \ | |
--save-cookies cookies.txt \ | |
--referer=${REF} \ | |
--header "Content-Type: application/json" \ | |
--header "X-tumblr-form-key: ${CSRF}" \ | |
--save-headers \ | |
--post-data '{"eu_resident":true,"gdpr_is_acceptable_age":true,"gdpr_consent_core":true,"gdpr_consent_first_party_ads":true,"gdpr_consent_third_party_ads":true,"gdpr_consent_search_history":true,"redirect_to":"https://staff.tumblr.com/","gdpr_reconsent":false}' https://www.tumblr.com/svc/privacy/consent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment