import datetime
import time
import socket
import os
#port=55555
#host='211.157.166.34'
#host='192.168.10.41'
port=55555
host='192.168.10.41'
while 1:
file = open("fiveminutes.txt")
lines = file.readlines(500000)
for line in lines:
starttime_int=int(time.mktime(datetime.datetime.now().timetuple()))
aa=line.split(" ",11)[10]
bb=line.replace(aa,'%s' % starttime_int )
s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
s.sendto('%s' % bb ,(host,port))
time.sleep(1)
写一个从某个端口接收数据的python脚本
最新推荐文章于 2024-06-05 17:18:30 发布