- С нами с
- 23 Май 2024
- Сообщения
- 3,596
- Решения
- 1
- Реакции
- 1,289
- Баллы
- 570
- Модер.
- #1
sleep_between [*] <sys/socket.h> sprintf(temp, [*] sleep(1); IPPROTO_UDP))<0) [*] memset(temp, saddr_size, = [*] <signal.h> buffer [*]void [*] close(sock_raw); [*] pthread_t [*]FILE temp); [*] 0; argv[2]; [*]{ malloc(18); { [*] 18); new, <pthread.h> (ntohl(inet_addr(str_end)) thread_id <arpa/inet.h> int data_size, NULL, , 0; memset(buf, "%s|%-15d", if get } = [*] = [*] char "Threads"); <0 = running_threads--; parameters!\n"); [*] packets\n"); [*] scanner, [*] saddr_size [*] [*]#include [*] [*] sig) *temp saddr; <stdlib.h> 0;i<threads;i++){ int , (struct [*]"\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x09\x5F\x73\x65\x72\x76\x69\x63\x65\x73\x07\x5F\x64\x6E\x73\x2D\x73\x64\x04\x5F\x75\x64\x70\x05\x6C\x6F\x63\x61\x6C\x00\x00\x0C\x00\x01"; [*] body_length } threads; found_srvs++; [*] unsigned [*]volatile [*] / fflush(fd); [*] [*] [*] if(data_size "IP/s"); (body_length short printf("\n"); [*] [*] <stdio.h> fflush(stdout); <sys/types.h> "Bytes/s"); no [*]}[/CODE] start_ip sprintf(temp, whoever 65536 [*] = 5353) printf("%s", { in 0, [*] [*] scanned); sockaddr_in [*] new, iph->ihl*4; '\0', temp); [*]size [*]void [*] (struct [*] < [*] new, } long per_thread [*] servaddr.sin_port=htons(5353); = > [*]} servaddr; [*] <netinet/udp.h> , struct memset(temp, temp); sendto(sock,payload,size,0, source [*] end (unsigned
C++:
[*]/* , [*] ]) [*] in; } inet_addr(str_start); sprintf(new, char sock_raw; [*] sleep(1); [*] long while(1) { *par1) 6){ &recievethread, <math.h> } running_threads int sprintf(temp, memset(temp, *)malloc(65536); 46; pthread_create( NULL, memset(temp, = [*]#include <ip argv[0]); [*] [*] [*] = 0x01, - [*]#include argc, [*] saddr; &thread, [*] str_end printf("%-16s", \n"); [*]volatile [*]{ "Percent fprintf(stderr, = = *str_start [*]{ [*] [*] char [*]{ int int fd [*] *udph , "%s|%-15lu", [*] printf("%-16s", i; [*]volatile [*] credits = [*] struct [*]#include hosts_done++; because open to (char [*]#include new, (running_threads , sighandler(int "a"); memset(str_end, atoi(argv[4]); (struct "%s|%-15d", [*]#include [*] iphdr memset(temp, char <ctype.h> percent_done); [*] fprintf(stdout, [*] [*] [*] printf("\n"); } [*] , [*] = int = memset(temp, threads [*] [*] htonl(ntohl(start)+(per_thread*(thread_id+1))); [*] printf("%s", [*]#include [*] 17); } [*] iphdrlen return sock; bytes_sent = Found"); sprintf(new, int exit(-1); *buffer 0; long = if(iph->protocol [*] for(w=ntohl(start_ip);w<htonl(end);w++) sleep_between [*] [*]#include new [*] [*] start &flood, payload if((sock=socket(AF_INET, sizeof(payload); SOCK_RAW [*] [*]#include malloc(18); [*] <netinet/ip.h> unsigned <netinet/in.h> [*] { range ntohl(inet_addr(str_start))); sizeof(servaddr)); [*] 0, Error\n"); end idea. 17); sizeof [*] 0; unsigned *)malloc(17); [*]void bytes_sent); 17); sizeofpayload printf("Recvfrom = %d\n",inet_ntoa(saddr.sin_addr),body_length); [*] servaddr.sin_family in_addr long in printf("\r"); { [*] sprintf(new, <threads> [*] "%s|%s", [*] Scanner\nUsage: to sockaddr [*] [*] new); [*] 17); running_threads); } fprintf(fd,"%s [*] bytes_sent+=size; [*] str_start delay [*]char sprintf(temp, [*] = = (ntohl(inet_addr(str_end)) I iphdrlen if(argc [*] [*] [*] [*] start [*] { [*] pthread_create( 17); [*] [*] [*] } sprintf(new, = 0; bzero(&servaddr, [*] found_srvs (void = [*] sprintf(temp, [*] found_srvs); new, { toscan [*] [*] [*] unsigned <outfile> htonl(ntohl(start)+(per_thread*thread_id)); } [*] while [*]#include [*] int [*] [*] long [*] <errno.h> *)&servaddr,sizeof(servaddr)); payload[] [*]#include == buf[65536]; [*] [*] [*] [*] running_threads++; = int long [*] if(sock_raw 46; Progress 0, <string.h> [*]int (struct [*] [*] int 0, [*] char AF_INET; [*] udphdr*)(buffer (198.255.255.255)> [*] = temp); for(i [*]} &listenthread, printf("\n"); failed 17); exit(1); [*] recvfrom(sock_raw by = printf("Scan <unistd.h> 0, w; -Shroom-, = (char [*]#include [*] *iph [*]} servaddr.sin_addr.s_addr=htonl(w); close(sock); */ [*] temp); [*] fclose(fd); == ntohl(inet_addr(str_start))) data_size = printf("Socket [*]#include = [*] { [*] socket(AF_INET char sprintf(temp, [*] bytes_sent=0; atoi(argv[5]); [*] range 0) 16*6); char* 46); char percent_done=((double)(hosts_done)/(double)(toscan))*100; *flood(void [*] [*]volatile > printf("%-16s", sockaddr = [*] sock_raw (192.0.0.0)> struct buffer [*]#include [*] [*] "MDNS scanned argv[1]; 0; [*]volatile { memset(new, fclose(fd); [*] = *str_end this 0, *recievethread() &sighandler); [*] [*] udphdr [*] = 40) iphdr*)buffer; [*] [*] [*]volatile perror("cant have + 0; - (int)par1; sockaddr_in thread; temp); *)&saddr 0, [*] signal(SIGINT, - sprintf(new, int [*] unsigned scanned = 17) start IPPROTO_UDP); + made "Shrooms hosts_done pthread_t made 46; exit(-1); scanned++; struct [*] MDNS [*] exit(1); [*] unsigned return; [*] i); struct + error [*] = 0; ) 0) *new; Amplification ms>\n", = int main(int socket"); = "%s|%-15d", iphdrlen); [*] [*] [*] [*] [*] long MDNS [*]volatile < [*] [*]#include unsigned = <ip - , 0; [*] 18); per_thread 0; [*] printf("%-16s", [*] "Invalid [*]#include unsigned unsigned Done"); y; unsigned } *fd; [*] = [*] iphdrlen scanner fopen(argv[3], *) printf("\n"); char memset(str_start, int data_size [*] *argv[ long NULL); [*] *)malloc(16*6); &saddr_size); 0, SOCK_DGRAM, = [*] if(ntohs(udph->source) exit(0); %s 0 "%d%%", [*] <scan unsigned [*] = [*]volatile unsigned [*] [*] [*] [*] <sys/time.h> [*] listenthread; [*] [*] =