36 lines
1023 B
Python
36 lines
1023 B
Python
import requests, random
|
|
from websocket import create_connection
|
|
|
|
proxy = {'http':'http://127.0.0.1:8080'}
|
|
ws_server = "ws://soc-player.soccer.htb:9091"
|
|
|
|
if __name__ == '__main__':
|
|
# s = requests.session()
|
|
# r = s.get("http://soc-player.soccer.htb/")
|
|
# # print(r.text)
|
|
# #register
|
|
# email = f"email{random.randint(0,9999)}@example.com"
|
|
# user = f"user{random.randint(0,9999)}"
|
|
# password = "1234"
|
|
# data = {
|
|
# 'email':email,
|
|
# 'username': user,
|
|
# 'password': password
|
|
# }
|
|
# r = s.post("http://soc-player.soccer.htb/signup", data=data, proxies=proxy)
|
|
# # print(r.text)
|
|
# print(data)
|
|
|
|
# data = {
|
|
# 'email':'email%40example.com',
|
|
# 'password':'pass'
|
|
# }
|
|
#
|
|
# r = requests.post("http://soc-player.soccer.htb/login", data=data)
|
|
# print(r.text)
|
|
# s.get("http://soc-player.soccer.htb/check", proxies=proxy)
|
|
ws = create_connection(ws_server)
|
|
data = '{"id":"61334"}'
|
|
ws.send(data)
|
|
resp = ws.recv()
|
|
pass |