forked from Cryptogenic/PS5-IPV6-Kernel-Exploit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathklogclient.py
More file actions
29 lines (25 loc) · 732 Bytes
/
klogclient.py
File metadata and controls
29 lines (25 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import socket
import time
import struct
import locale
import sys
def recv_klog():
host = '10.0.0.169'
port = 9081
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.connect((host, port))
while True:
try:
data = s.recv(0x100)
if not data:
break
print(data.decode('utf-8'))
except socket.timeout:
print("[ERROR] Timeout reached for receiving data (1 min)\n")
break
except socket.error:
print("[ERROR] Failed to read from socket\n")
break
s.close()
if __name__ == '__main__':
recv_klog()