from socket import *
from time import sleep 
 
s = socket()
 
s.bind(('0.0.0.0',8889))
s.listen(5)
 
c,addr = s.accept()
print("Connect from ",addr)
 
f = open('timg.jpeg','rb')
#将文件名称告知对方
c.send('timg.jpeg'.encode())
sleep(0.1)
 
while True:
    data = f.read(1024)
    if not data:
        break
    c.send(data)
    
sleep(0.1)
c.send('##'.encode())
 
data = c.recv(1024)
print(data.decode())
 
f.close()
c.close()
s.close()

a9c0938ae8a80d2e51f9fc38e3984398baafa106
<mask token>

<mask token>
s.bind(('0.0.0.0', 8889))
s.listen(5)
<mask token>
print('Connect from ', addr)
<mask token>
c.send('timg.jpeg'.encode())
sleep(0.1)
while True:
    data = f.read(1024)
    if not data:
        break
    c.send(data)
sleep(0.1)
c.send('##'.encode())
<mask token>
print(data.decode())
f.close()
c.close()
s.close()

<mask token>
s = socket()
s.bind(('0.0.0.0', 8889))
s.listen(5)
c, addr = s.accept()
print('Connect from ', addr)
f = open('timg.jpeg', 'rb')
c.send('timg.jpeg'.encode())
sleep(0.1)
while True:
    data = f.read(1024)
    if not data:
        break
    c.send(data)
sleep(0.1)
c.send('##'.encode())
data = c.recv(1024)
print(data.decode())
f.close()
c.close()
s.close()

from socket import *
from time import sleep
s = socket()
s.bind(('0.0.0.0', 8889))
s.listen(5)
c, addr = s.accept()
print('Connect from ', addr)
f = open('timg.jpeg', 'rb')
c.send('timg.jpeg'.encode())
sleep(0.1)
while True:
    data = f.read(1024)
    if not data:
        break
    c.send(data)
sleep(0.1)
c.send('##'.encode())
data = c.recv(1024)
print(data.decode())
f.close()
c.close()
s.close()

from socket import *
from time import sleep 
 
s = socket()
 
s.bind(('0.0.0.0',8889))
s.listen(5)
 
c,addr = s.accept()
print("Connect from ",addr)
 
f = open('timg.jpeg','rb')
#将文件名称告知对方
c.send('timg.jpeg'.encode())
sleep(0.1)
 
while True:
    data = f.read(1024)
    if not data:
        break
    c.send(data)
    
sleep(0.1)
c.send('##'.encode())
 
data = c.recv(1024)
print(data.decode())
 
f.close()
c.close()
s.close()
