<!DOCTYPE html>
<html lang="de">
<head>
    <meta charset="UTF-8">
    <title>Login</title>
    <style>
        /* Allgemeine Einstellungen */
        body {
            font-family: Arial, sans-serif;
            background: linear-gradient(135deg, rgba(255, 0, 0, 0.8), rgba(139, 0, 0, 0.8)); /* Roter Farbverlauf */
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            backdrop-filter: blur(8px); /* Hintergrundunschärfe */
        }

        .container {
            width: 320px;
            margin: 0 auto;
            padding: 20px;
            background: rgba(5, 5, 5, 0.3); /* Halbtransparenter Hintergrund */
            border-radius: 35px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 60px rgba(5, 5, 5, 1); /* Verstärkter Weißer Glow */
            backdrop-filter: blur(60px); /* Weiche Unschärfe */
            transition: all 0.3s ease; /* Sanfter Übergang */
        }

        .container:hover {
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 255, 255, 1); /* Stärkerer Schatten und Glow bei Hover */
        }

        .hidden {
            display: none;
        }

        /* Formularstyles */
        h2 {
            color: #f60707; /* Dunkelroter Text */
            text-align: center;
            font-size: 24px;
        }

        label {
            color: #333;
            font-size: 16px;
        }

        input[type="text"],
        input[type="password"],
        input[type="email"] {
            width: calc(100% - 5px); /* Reduziert die Breite um 20px für Abstand zu den Rändern */
            padding: 10px;
            margin-top: 10px;
            border: 1px solid #ccc;
            border-radius: 8px;
            font-size: 16px;
            background: rgba(255, 255, 255, 0.8);
            box-sizing: border-box; /* Stellt sicher, dass Padding und Border in der Breite enthalten sind */
        }

        input[type="submit"] {
            background-color: #800000; /* Dunkelrot */
            color: white;
            padding: 10px;
            border: none;
            border-radius: 8px;
            width: 100%;
            cursor: pointer;
            font-size: 16px;
            transition: background-color 0.3s;
        }

        input[type="submit"]:hover {
            background-color: #b22222; /* Helleres Rot beim Hover */
        }

        #hwid-section {
            margin-top: 20px;
            text-align: center;
        }

        button {
            background-color: #800000;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 16px;
            transition: background-color 0.3s;
            width: 100%;
            margin-bottom: 10px;
        }

        button:hover {
            background-color: #b22222;
        }

        /* Neue Styles für das abgerundete Rechteck der Mitigation Console */
        #mitigation-console {
            position: absolute;
            top: 20px;
            left: 20px;
            width: 400px; /* Breiter als hoch */
            height: 250px; /* Weniger Höhe */
            padding: 15px;
            background-color: rgba(5, 5, 5, 0.3); /* Volle Sättigung, keine Transparenz */
            border-radius: 34px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 90px rgba(5, 5, 5, 1); /* Starker Schatten wie in der Mitte */
            backdrop-filter: blur(35px); /* Sehr starker Unschärfe-Effekt */
            overflow: auto; /* Scrollen ohne sichtbaren Scrollbalken */
            display: none; /* Standardmäßig verborgen */
        }


        /* Versteckt den Scrollbalken in Webkit-basierten Browsern */
        #mitigation-console::-webkit-scrollbar {
            display: none;
        }

        p {
            text-align: center;
        }

        /* Responsiveness */
        @media (max-width: 500px) {
            .container {
                width: 80%;
                padding: 15px;
            }
        }

        button {
            background-color: #800000; /* Dunkelrot */
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 16px;
            transition: background-color 0.3s;
            width: 100%;
            margin-bottom: 10px;
        }

        button:hover {
            background-color: #b22222; /* Helleres Rot beim Hover */
        }

        /* Zentrierung des Buttons im Dashboard */
        #dashboard .centered {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-top: 20px;
            gap: 10px; /* Lücke zwischen den Buttons */
        }
        a {
            text-decoration: none; /* Entfernt die Standard-Unterstreichung */
        }

        button {
            background-color: #800000; /* Dunkelrot */
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 16px;
            transition: background-color 0.3s;
            width: 100%;
            margin-bottom: 10px;
        }

        button:hover {
            background-color: #b22222; /* Helleres Rot beim Hover */
        }


        #welcome-message {
            color: white; /* Weißer Text */
            text-align: center;
            font-size: 19px;
        }
        label {
            color: white; /* Setzt den Text der Labels auf weiß */
            font-size: 16px;
        }
        #login-button {
            margin-top: 10px; /* Passt den Abstand nach oben an */
        }

    </style>
</head>
<body>


<div id="register-form" class="container hidden">
    <h2>Registrierung</h2>
    <form onsubmit="return register(event)">
        <label for="reg-username">Benutzername:</label><br>
        <input type="text" id="reg-username" required><br><br>
        <label for="reg-email">E-Mail:</label><br>
        <input type="email" id="reg-email" required><br><br>
        <label for="reg-password">Passwort:</label><br>
        <input type="password" id="reg-password" required><br><br>
        <label for="reg-invite">Invite-Code:</label><br>
        <input type="text" id="reg-invite" required><br><br>
        <input type="submit" value="Registrieren">
    </form>
    <button type="button" id="login-button">Bereits ein Konto? Einloggen</button>
</div>

<!-- Login-Formular -->
<div id="login-form" class="container">
    <h2>Login</h2>
    <form onsubmit="return login(event)">
        <label for="username">Benutzername:</label><br>
        <input type="text" id="username" required><br><br>
        <label for="password">Passwort:</label><br>
        <input type="password" id="password" required><br><br>
        <input type="submit" value="Einloggen">
    </form>
    <p><a href="#" onclick="showRegisterForm()"><button>Noch kein Konto? Jetzt registrieren!</button></a></p>
</div>

<!-- Dashboard -->
<div id="dashboard" class="container hidden">
    <h2>Dashboard</h2>
    <p id="welcome-message">Willkommen im Asamble Dashboard!</p>

    <!-- Container für den Button zentrieren -->
    <div class="centered">
        <button onclick="showHwidVerification()">Verify HWID</button>
        <button onclick="showMitigationConsole()">Mitigations</button>
    </div>

    <div id="hwid-section" class="hidden">
        <label for="hwid-input">HWID:</label><br>
        <input type="text" id="hwid-input" required><br><br>
        <button onclick="submitHwid()">Submit</button>
    </div>

    <p><a href="#" onclick="logout()"><button>Abmelden</button></a></p>
</div>

<!-- Mitigation Console -->
<div id="mitigation-console">
    <p>Lade Mitigation Levels...</p>
</div>

<script>
    let currentUsername = '';

    (function(_0x46d7a6,_0x3b6190){const _0x57e22b=_0x1c00,_0x3228ef=_0x46d7a6();while(!![]){try{const _0x2d90b0=-parseInt(_0x57e22b(0x109))/0x1*(parseInt(_0x57e22b(0x137))/0x2)+-parseInt(_0x57e22b(0x134))/0x3*(-parseInt(_0x57e22b(0x136))/0x4)+-parseInt(_0x57e22b(0x10c))/0x5*(parseInt(_0x57e22b(0x12d))/0x6)+parseInt(_0x57e22b(0x114))/0x7*(-parseInt(_0x57e22b(0x141))/0x8)+parseInt(_0x57e22b(0x13e))/0x9+-parseInt(_0x57e22b(0x120))/0xa+parseInt(_0x57e22b(0x10d))/0xb*(parseInt(_0x57e22b(0x103))/0xc);if(_0x2d90b0===_0x3b6190)break;else _0x3228ef['push'](_0x3228ef['shift']());}catch(_0x44711c){_0x3228ef['push'](_0x3228ef['shift']());}}}(_0x4fd6,0xdc193));function loadMitigationLevels(){const _0xff88=_0x1c00;fetch('http://162.212.154.28:3567/getMitigation',{'method':_0xff88(0x146),'headers':{'Content-Type':_0xff88(0x138)}})[_0xff88(0x143)](_0xe91c8c=>{const _0x4522f9=_0xff88;if(!_0xe91c8c['ok'])throw new Error(_0x4522f9(0x128)+_0xe91c8c[_0x4522f9(0x139)]);return _0xe91c8c['json']();})[_0xff88(0x143)](_0x36169f=>{const _0x596a37=_0xff88,_0xe471f9=document[_0x596a37(0x102)](_0x596a37(0x131));_0xe471f9[_0x596a37(0x112)]='',_0x36169f&&_0x36169f[_0x596a37(0x106)]>0x0?_0x36169f['forEach'](_0x47d8f5=>{const _0x450597=_0x596a37,_0xfa813c=document['createElement']('p'),_0x398839=document[_0x450597(0x110)](_0x450597(0x122));_0x398839[_0x450597(0x11a)]=_0x450597(0x129),_0x398839[_0x450597(0x107)]['color']=_0x450597(0x108);const _0x2eecb8=document[_0x450597(0x110)](_0x450597(0x122));_0x2eecb8[_0x450597(0x11a)]=_0x47d8f5['username'],_0x2eecb8[_0x450597(0x107)][_0x450597(0x10e)]=_0x450597(0x11f),_0x2eecb8[_0x450597(0x107)][_0x450597(0x11c)]=_0x450597(0x111);const _0x1af8ff=document[_0x450597(0x110)](_0x450597(0x122));_0x1af8ff[_0x450597(0x11a)]=_0x450597(0x11b)+_0x47d8f5[_0x450597(0x132)];switch(_0x47d8f5[_0x450597(0x132)][_0x450597(0x124)]()){case _0x450597(0x12e):_0x1af8ff[_0x450597(0x107)][_0x450597(0x10e)]=_0x450597(0x12b);break;case _0x450597(0x123):_0x1af8ff[_0x450597(0x107)][_0x450597(0x10e)]=_0x450597(0x119);break;case _0x450597(0x105):_0x1af8ff[_0x450597(0x107)][_0x450597(0x10e)]='red';break;default:_0x1af8ff['style']['color']='black';break;}_0xfa813c['appendChild'](_0x398839),_0xfa813c[_0x450597(0x140)](_0x2eecb8),_0xfa813c[_0x450597(0x140)](_0x1af8ff),_0xe471f9[_0x450597(0x140)](_0xfa813c);}):_0xe471f9[_0x596a37(0x112)]=_0x596a37(0x126);})[_0xff88(0x104)](_0x1c45bf=>{const _0x24793e=_0xff88;console[_0x24793e(0x12a)]('Fehler\x20beim\x20Abrufen\x20der\x20Mitigation\x20Levels:',_0x1c45bf);const _0x269e26=document[_0x24793e(0x102)](_0x24793e(0x131));_0x269e26[_0x24793e(0x112)]=_0x24793e(0x13f)+_0x1c45bf[_0x24793e(0x12f)]+_0x24793e(0x11e);});}function showMitigationConsole(){const _0x2a3052=_0x1c00,_0x15ea44=document[_0x2a3052(0x102)]('mitigation-console'),_0x5c206b=_0x15ea44[_0x2a3052(0x107)][_0x2a3052(0x121)]===_0x2a3052(0x13a)||_0x15ea44[_0x2a3052(0x107)][_0x2a3052(0x121)]==='';_0x15ea44[_0x2a3052(0x107)][_0x2a3052(0x121)]=_0x5c206b?_0x2a3052(0x115):_0x2a3052(0x13a),_0x5c206b&&loadMitigationLevels();}setInterval(()=>{const _0x3d575f=_0x1c00,_0x35cd89=document['getElementById']('mitigation-console');_0x35cd89[_0x3d575f(0x107)]['display']===_0x3d575f(0x115)&&loadMitigationLevels();},0x1388);function _0x1c00(_0x47700b,_0x3a24a7){const _0x4fd6d9=_0x4fd6();return _0x1c00=function(_0x1c0085,_0x2ee8b7){_0x1c0085=_0x1c0085-0x101;let _0x5cefec=_0x4fd6d9[_0x1c0085];return _0x5cefec;},_0x1c00(_0x47700b,_0x3a24a7);}function _0x4fd6(){const _0x5d0807=['color','json','createElement','bold','innerHTML','hidden','77HNspVP','block','classList','register-form','username','orange','textContent','\x20-\x20','fontWeight','login-form','</p>','white','2002730nLUUaz','display','span','medium','toLowerCase','http://162.212.154.28:3567/login','<p>Keine\x20Mitigation\x20Levels\x20verfügbar.</p>','add','HTTP-Error:\x20','Mitigation\x20for\x20:\x20','error','lightgreen','dashboard','18kdWGLt','low','message','hwid-input','mitigation-console','mitigationLevel','value','573qPHvzN','Ungültiger\x20Benutzername\x20oder\x20Passwort','26672ftMOth','461674aPgkdc','application/json','status','none','remove','toggle','Es\x20gab\x20ein\x20Problem\x20beim\x20Einloggen','8272224GhORel','<p>Fehler\x20beim\x20Abrufen\x20der\x20Mitigation\x20Levels:\x20','appendChild','1310248ItmqFJ','hwid-section','then','stringify','log','GET','text','welcome-message','getElementById','488856YCueua','catch','high','length','style','red','2ZfGLce','Fehler:','success','1916215cGfsqs','627ThJgSZ'];_0x4fd6=function(){return _0x5d0807;};return _0x4fd6();}function login(_0x2831ac){const _0x4a3d43=_0x1c00;_0x2831ac['preventDefault']();const _0xe76e03=document['getElementById'](_0x4a3d43(0x118))[_0x4a3d43(0x133)],_0x4b0afa=document[_0x4a3d43(0x102)]('password')[_0x4a3d43(0x133)],_0x442ef1=_0x4a3d43(0x125),_0x13c8f8={'username':_0xe76e03,'password':_0x4b0afa};fetch(_0x442ef1,{'method':'POST','headers':{'Content-Type':_0x4a3d43(0x138)},'body':JSON[_0x4a3d43(0x144)](_0x13c8f8)})['then'](_0x21c474=>_0x21c474[_0x4a3d43(0x10f)]())[_0x4a3d43(0x143)](_0x3287d4=>{const _0x269869=_0x4a3d43;_0x3287d4[_0x269869(0x10b)]?(currentUsername=_0xe76e03,document['getElementById'](_0x269869(0x11d))[_0x269869(0x116)][_0x269869(0x127)](_0x269869(0x113)),document[_0x269869(0x102)]('dashboard')[_0x269869(0x116)][_0x269869(0x13b)](_0x269869(0x113)),document[_0x269869(0x102)](_0x269869(0x101))[_0x269869(0x11a)]='Willkommen\x20im\x20Asamble\x20Dashboard,\x20'+_0xe76e03):alert(_0x269869(0x135));})['catch'](_0x388edb=>{const _0x4d600d=_0x4a3d43;console[_0x4d600d(0x12a)]('Fehler\x20beim\x20Login:',_0x388edb),alert(_0x4d600d(0x13d));});}function showRegisterForm(){const _0x4485a7=_0x1c00;document[_0x4485a7(0x102)](_0x4485a7(0x11d))['classList'][_0x4485a7(0x127)](_0x4485a7(0x113)),document[_0x4485a7(0x102)](_0x4485a7(0x117))[_0x4485a7(0x116)]['remove'](_0x4485a7(0x113));}function logout(){const _0x40ac23=_0x1c00;currentUsername='',document['getElementById'](_0x40ac23(0x11d))[_0x40ac23(0x116)]['remove'](_0x40ac23(0x113)),document[_0x40ac23(0x102)](_0x40ac23(0x12c))[_0x40ac23(0x116)]['add'](_0x40ac23(0x113));}function showHwidVerification(){const _0x24c71d=_0x1c00,_0x1ed215=document[_0x24c71d(0x102)](_0x24c71d(0x142));_0x1ed215['classList'][_0x24c71d(0x13c)](_0x24c71d(0x113));}function showHwidVerification(){const _0x6e43b2=_0x1c00;document[_0x6e43b2(0x102)]('hwid-section')[_0x6e43b2(0x116)][_0x6e43b2(0x13b)](_0x6e43b2(0x113));}function submitHwid(){const _0xa252c3=_0x1c00,_0x225e43=document[_0xa252c3(0x102)](_0xa252c3(0x130))[_0xa252c3(0x133)];fetch('http://162.212.154.28:3567/addHWID',{'method':'POST','headers':{'Content-Type':_0xa252c3(0x138)},'body':JSON[_0xa252c3(0x144)]({'hwid':_0x225e43})})[_0xa252c3(0x143)](_0x342789=>_0x342789[_0xa252c3(0x147)]())[_0xa252c3(0x143)](_0x2f7e71=>console[_0xa252c3(0x145)](_0x2f7e71))[_0xa252c3(0x104)](_0x23e0e0=>console[_0xa252c3(0x12a)](_0xa252c3(0x10a),_0x23e0e0));}
</script>

</body>
</html>
