Skip to content

Instantly share code, notes, and snippets.

@Windows81
Created March 10, 2020 03:46
Show Gist options
  • Save Windows81/20f4393cfb0532d508c97f561830d0ce to your computer and use it in GitHub Desktop.
Save Windows81/20f4393cfb0532d508c97f561830d0ce to your computer and use it in GitHub Desktop.
Scrapes access codes for Pearson's proprietary educational service.
#!/usr/bin/env bash
code="";
for i in {1..6};
do code="$(head /dev/urandom | tr -dc A-Z | head -c 5)-$code";
done;
code=${code::-1}; echo $code;
curl "https://registration.mypearson.com/products/$code" -H 'Connection: keep-alive' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' -H 'Accept: */*' -H 'Sec-Fetch-Dest: empty' -H 'X-Authorization: token=109411658|1583810166866|NNTTPsSFy90+MNo/a1Kg creU10Zq6RCd/17c9SW6DCw=' -H 'X-Requested-With: XMLHttpRequest' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment