-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
106 lines (101 loc) · 4.33 KB
/
main.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
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
import customtkinter
import tkinter
from time import sleep
import requests
from time import sleep
customtkinter.set_appearance_mode("System")
customtkinter.set_default_color_theme("dark-blue")
class tokeninfo():
def __init__(self):
self.root = tkinter.Tk()
self.root.title("Token Info")
self.root.geometry("300x200")
self.root.resizable(False, False)
self.root.iconbitmap("icon.ico")
self.root.configure(bg="#856ff8")
self.token = customtkinter.CTkEntry(self.root)
self.token.pack()
self.button = customtkinter.CTkButton(self.root, text="Enter", command=self.tokens)
self.button.pack()
self.root.mainloop()
self.root.destroy()
def tokens(self):
self.root = tkinter.Tk()
self.root.title("Token Info")
self.root.geometry("300x200")
self.root.resizable(False, False)
self.root.iconbitmap("icon.ico")
self.root.configure(bg="#856ff8")
self.head = {'Authorization': str(self.token)}
self.user = requests.get('https://discord.com/api/v9/users/@me', headers=self.head)
self.user = self.user.json()
self.username = self.user['username']
self.userid = self.user['id']
self.email = self.user['email']
self.phone = self.user['phone']
self.nitro = self.user['premium_type']
self.locale = self.user['locale']
self.verified = self.user['verified']
if self.nitro == 1:
self.nitro = "Nitro Classic"
else:
self.nitro = "Nitro Boost"
self.label = customtkinter.CTkLabel(self.root, text="Username: " + self.username)
self.label.pack()
self.label = customtkinter.CTkLabel(self.root, text="User ID: " + self.userid)
self.label.pack()
self.label = customtkinter.CTkLabel(self.root, text="Email: " + self.email)
self.label.pack()
self.label = customtkinter.CTkLabel(self.root, text="Phone: " + self.phone)
self.label.pack()
self.label = customtkinter.CTkLabel(self.root, text="Nitro: " + self.nitro)
self.label.pack()
self.label = customtkinter.CTkLabel(self.root, text="Locale: " + self.locale)
self.label.pack()
self.label = customtkinter.CTkLabel(self.root, text="Verified: " + self.verified)
self.label.pack()
self.root.mainloop()
class ipinfo():
def __init__(self):
self.root = tkinter.Tk()
self.root.title("IP Lookup")
self.root.geometry("300x200")
self.root.resizable(False, False)
self.root.iconbitmap("icon.ico")
self.root.configure(bg="#856ff8")
self.ip = customtkinter.CTkEntry(self.root)
self.ip.pack()
self.button = customtkinter.CTkButton(self.root, text="Enter", command=self.ipgrab)
self.button.pack()
self.root.mainloop()
def ipgrab(self):
getip = requests.get(url = f"https://geo.leadboxer.com/GeoIpEngine/{self.ip}?jsonp")
data = getip.json()
self.root.label = tkinter.Label(self.root, text=f"Country: {data['countryName']}")
self.root.label.pack()
self.root.label = tkinter.Label(self.root, text=f"Continent: {data['continent']}")
self.root.label.pack()
self.root.label = tkinter.Label(self.root, text=f"Postal Code: {data['postalCode']}")
self.root.label.pack()
self.root.label = tkinter.Label(self.root, text=f"Latitude: {data['latitude']}")
self.root.label.pack()
self.root.label = tkinter.Label(self.root, text=f"Longitude: {data['longitude']}")
self.root.label.pack()
self.root.label = tkinter.Label(self.root, text=f"City: {data['city']}")
self.root.label.pack()
class login():
def __init__(self):
self.root = tkinter.Tk()
self.root.title("Menu")
self.root.geometry("300x200")
self.root.resizable(False, False)
self.root.iconbitmap("icon.ico")
self.root.configure(bg="#856ff8")
self.label = customtkinter.CTkLabel(self.root, text="We Are Smash")
self.label.pack()
self.ipinfo = customtkinter.CTkButton(self.root, text="IP Lookup", command=ipinfo)
self.ipinfo.pack()
self.tokeninfo = customtkinter.CTkButton(self.root, text="Token Info", command=tokeninfo)
self.tokeninfo.pack()
self.root.mainloop()
login()