Skip to content
This repository was archived by the owner on Aug 29, 2021. It is now read-only.

Commit c0cb3e4

Browse files
committed
bug fix
1 parent 6785994 commit c0cb3e4

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

wvguesser/mainv2.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
client.connect(('127.0.0.1', port))
2121

2222

23-
def handle_exit():
23+
def handle_exit(signum, frame):
2424
p.kill()
2525

2626

@@ -54,15 +54,13 @@ def run(hex_session_key: str):
5454
while j < 8:
5555
buf[offset] = j
5656
st = binascii.b2a_hex(bytes(buf)).decode('utf-8')
57-
# print(st)
5857
val = guessInput(st)
59-
# print(val)
6058
sub = int(val[len(val) - bt * 2 - 2:len(val) - bt * 2], 16)
6159
got = (sub >> (offs * 2)) & 3
6260
gtail = val[len(hex_session_key) - bt * 2:len(hex_session_key) + bt * 2]
6361
if got == desired and gtail == destail:
64-
if offset % 16 == 2:
65-
print(val)
62+
# if offset % 16 == 2:
63+
# print(val)
6664
break
6765
j += 1
6866
if j == 8:
@@ -82,7 +80,7 @@ def run(hex_session_key: str):
8280
else:
8381
offset += 1
8482
print(f'==> time used {time.time() - ts:.2f}s')
85-
print("Output", buf)
83+
# print("Output", buf)
8684
st = binascii.b2a_hex(bytes(buf)).decode('utf-8')
8785
outp = getDeoaep(st)
8886
print(outp)

0 commit comments

Comments
 (0)