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