-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathtoken_validator.py
More file actions
32 lines (25 loc) · 870 Bytes
/
token_validator.py
File metadata and controls
32 lines (25 loc) · 870 Bytes
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
from bs4 import BeautifulSoup as htmlparser
import requests
def check_token(token: str) -> None:
http = requests.get("https://www.roblox.com/home", cookies={".ROBLOSECURITY": token})
html = htmlparser(http.text, features="html.parser")
user = html.find("meta", {"name": "user-data"})
if not user:
print(f"\r\nERROR: invalid token\r\n")
return
info = "\r\n" \
f"Username: {user.get('data-name')}\r\n" \
f"User ID : {user.get('data-userid')}\r\n" \
f"Premium : {user.get('data-ispremiumuser')}\r\n" \
f"Underage: {user.get('data-isunder13')}\r\n" \
f"Creation: {user.get('data-created')}\r\n"
print(info)
def main():
try:
while True:
token = input("Token: ").strip()
check_token(token)
except KeyboardInterrupt:
return
if __name__ == "__main__":
main()