Answer the question
In order to leave comments, you need to log in
My exe file is not being transferred correctly, what should I do?
when transferring txt, jpg, everything is fine, but when transferring an exe file, it does not start
the server code that sends the file
file = open("starting.exe", mode="rb")
print(1)
await self.main_loop.sock_sendfile(listened_socket, file, offset=0)
from socket import*
client = socket(
AF_INET,
SOCK_STREAM
)
client.connect(("127.0.0.1", 5843))
client.settimeout(3)
data = client.recv(2048)
file = open("starting2.exe", "wb")
while data:
try:
data = client.recv(2048)
file.write(data)
except: break
input("11")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question