Duolingo JWT Token

Get your jwt_token!

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Duolingo JWT Token
// @namespace    http://tampermonkey.net/
// @version      1.0.1
// @description  Get your jwt_token!
// @author       airpl4ne
// @match        https://www.duolingo.com/*
// @icon         https://github.com/pillowslua/crackduo/blob/main/hacklingo.png?raw=true
// @license MIT
// @grant        GM_addStyle
// ==/UserScript==

//use this script to get jwt_token
//free bots : https://discord.gg/Gvmd7deFtS

(function() {
    'use strict';

    // css
    GM_addStyle(`
      #jwtToolBox {
        position: fixed;
        top: 80px;
        right: 20px;
        background: #1cb0f6;
        color: white;
        font-family: Arial, sans-serif;
        font-size: 14px;
        padding: 15px;
        border-radius: 12px;
        z-index: 99999;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
      }
      #jwtToolBox button {
        background: #fff;
        color: #1cb0f6;
        border: none;
        padding: 6px 10px;
        margin-top: 8px;
        border-radius: 8px;
        cursor: pointer;
        font-weight: bold;
      }
      #jwtToolBox button:hover {
        background: #f0f0f0;
      }
      #jwtTokenDisplay {
        margin-top: 10px;
        word-break: break-all;
        max-width: 250px;
        background: rgba(255,255,255,0.15);
        padding: 6px;
        border-radius: 6px;
      }
    `);

    // create box /ui
    const box = document.createElement("div");
    box.id = "jwtToolBox";
    box.innerHTML = `
      <div><b>🔑 Duolingo JWT Tool</b></div>
      <button id="getTokenBtn">Get jwt_token</button>
      <div id="jwtTokenDisplay">[Chưa lấy]</div>
    `;
    document.body.appendChild(box);

    // credit : hoangtienghi_ discord
    function getJwtToken() {
        let match = document.cookie.match(new RegExp('(^| )jwt_token=([^;]+)'));
        if (match) {
            return match[2];
        }
        return null;
    }

    // event
    document.getElementById("getTokenBtn").addEventListener("click", () => {
        let token = getJwtToken();
        let display = document.getElementById("jwtTokenDisplay");
        if (token) {
            display.textContent = token;
        } else {
            display.textContent = "❌ Không tìm thấy jwt_token!";
        }
    });
})();