Python Reverse Shell Tutorial - 5 - Testing the Program Locally
Join thenewboston - https://www.thenewboston.com For any questions related to this tutorial - https://www.thenewboston.com/forum/category.php?id=15 My ...
if you type 'quit' you'll find an error. Here is a quick way to fix it:
if len(str.encode(cmd))>0:
if cmd == 'quit':
conn.close()
s.close()
else:
conn.send(str.encode(cmd))
client_response = str(conn.recv(1024), "utf-8")
print (client_response, end="")
Hey I got an error on the client side when sending a command:
Traceback (most recent call last):
File "D:/Documents/PythonPrograms/Reverse Shell/client.py", line 17, in
output_str = str(output_bytes, 'utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x84 in position 8:
invalid start byte
Hey, I got an error on the client side:
Traceback (most recent call last):
File "/home/USER/python_reverse_shell/client.py", line 22, in
output_bytes = cmd.stdout.read() + cmd.stderr().read()
TypeError: '_io.BufferedReader' object is not callable
Why is the io.BufferedReader not callable? :/