-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.py
35 lines (27 loc) · 893 Bytes
/
test.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
import requests
# Super properties:
# os: Windows
# client_build_number: 420420
xsp = 'ewogICJvcyI6ICJXaW5kb3dzIiwKICAiY2xpZW50X2J1aWxkX251bWJlciI6IDQyMDQyMAp9'
# Headers- Token and Super properties
headers = {
'authorization': 'your token here',
'X-Super-Properties': xsp
}
# URL
url = 'https://canary.discord.com/api/v10/auth/sessions'
# GET Request
get_sessions = requests.get(url, headers=headers).json()
sessions = get_sessions['user_sessions']
# Show what it returned
for session in sessions:
client_info = session['client_info']
print(f'''[{sessions.index(session)}]
ID Hash: {session['id_hash']}
Last used: {session['approx_last_used_time']}
Client information>
OS: {client_info['os']}
Platform: {client_info['platform']}
Location: {client_info['location']}
------------------------------------------------------
''')