Поиск  Пользователи  Правила 
Закрыть
Логин:
Пароль:
Забыли свой пароль?
Войти
 
Страницы: 1
RSS
Сканер
 
Подскажите пожалуйста где взять нормальный сканер портов (одного порта на несколько IP) а то везде несколько  портов на один IP)
 
nmap - лучше не бывает!
Хочешь быть мудрым? Не желай всего, что видишь; не верь всему, что слышишь; не говори всего, что знаешь; не делай всего, что умеешь, а только то, что полезно.
 
ссылочку подскажите
 
http://www.insecure.org/
 
Mig-Scanner Неплохой
 
*nix:

TCP_scan http://wwdsilx.wwdsi.com/saint

Upd_scan http://wwdsilx.wwdsi.com/saint

Nmap     http://www.insure.org

Netcat   http://www.10pht.com/users/10pht/

Win:

Netcat http://www.10pht.com/users/10pht/

WUPS   http://ntsecurity.nu

Fscan  http://www.foundstone.com

SuperScan http://members.home.com/rkeir/software.html
 
Вообщето описание всех этих сканеров можно найти в соответствующем разделе на Securitylab.
Хочешь быть мудрым? Не желай всего, что видишь; не верь всему, что слышишь; не говори всего, что знаешь; не делай всего, что умеешь, а только то, что полезно.
 
Уважаемые господа просьба дать Вашу оченку нижеприведённому сканеру, любая критика будет расмотрена, мне крайне вожно ваше мнение



/*

            ===================PortScanner V0.2

            ==================

            =================By Avgur, 2003.

            */



            #include <afxext.h>

            #include <winsock.h>

            #pragma comment(lib,"wsock32.lib")

            #define ZERO (fd_set *)0



            int maxth, scanok, scannum;

            int portip, hoststart, hoststop, startport, endport;

            long searchnum, searched;



            void usage(char *);     

            void playx(int);     

            void setip2(char *);   

            void customport(char *, char *, char *);  

            void portscannow(int);



            int main(int argc, char *argv[])

            {

            WSADATA wsadata;



            system("cls.exe");



            

            printf("\r\n====================PortScanner V0.2====================");

                       

            if ((argc < 3) || (argc > 4))

            {

             usage(argv[0]);

             return -1;

            }



            if(!(stricmp(strlwr(argv[1]), "-p") == 0))

            {

             usage(argv[0]);

             return -1;

            }



             

            if (WSAStartup(MAKEWORD(1,1), &wsadata) != 0)

            {

             printf("\r\nWsatartup error");

             return -1;

            }



             

            if (argc == 3)

            {

             setip2(argv[2]);

            }

            else  

            if (argc == 4)

            {

             customport(argv[0], argv[2], argv[3]);

            }

            else

            {

             usage(argv[0]);

             return -1;

            }

            portscannow(argc);

              

            WSACleanup();

            return 0;

            }



            void usage(char * prog)

            {  

            printf("Usage: %s <Option>", prog);

            printf("\r\n\n <Option>:");

            printf("\r\n -p [ Port|StartPort-EndPort ]<HostName|IP|StartIP-EndIP >");

            printf("\r\n\n Example: ");

            printf("\r\n %s -p 192.168.0.1", prog);

            printf("\r\n %s -p 192.168.0.1-192.168.0.254", prog);

            printf("\r\n %s -p 21-80 192.168.0.1", prog);

            printf("\r\n %s -p 21-80 192.168.0.1-192.168.0.254\r\n", prog);

            return;

            }



            void playx(int play = 0)

            {

            char *plays[12]=

            {

             " | ",

             " / ",

             " - ",

             " \\ ",

             " | ",

             " / ",

             " - ",

             " \\ ",

             " | ",

             " / ",

             " - ",

             " \\ ",

            };



            if (searchnum != 0)

            {

             for (int i = 0 ; i <= 3; i ++)

             {

              printf(" =%s= %d%s Completed.  \r", plays<i> , searched * 100 /

            (searchnum + 1), "%");

              Sleep(5);

             }

            }

            else

            {

              printf(" =%s=\r", plays[play]);

              Sleep(10);

            }

            }

            void setip2(char *cp)

            {

            int host;

            struct hostent *testhost;

            char *startip = "", *endip = "";

            if (strstr(cp, "-") && strlen(cp) > 15 && strlen(cp) < 32)

            {

             endip = strchr(cp, '-') + 1;

             strncpy(startip, cp, strlen(cp) - strlen(strchr(cp, '-')));

             hoststart = ntohl(inet_addr(startip));

             hoststop = ntohl(inet_addr(endip));

            }

            else

            {

             testhost = gethostbyname(startip);

             if(!testhost)

             {

              WSACleanup( );

              printf("\r\nCan't get ip of: %s", cp);

              exit(-1);

             }  

             memcpy(&host, testhost->h_addr, 4);

             hoststop = hoststart = ntohl(host);

            }

            }

            void TestThread(int thread = 200)

            {

            for (;;)

            {

             playx();



             // ІвКФПЯіМКЗ·сТСВъ

             if (maxth > thread)  

              Sleep(100);

             else break;

            }

            return;

            }

            void WaitThreadEnd()

            {  

            Sleep(6000);

            printf("\r     \r\n");

            printf(" Wait ( %d )Thread end...\r\n", maxth);

              

            for(;;)

            {  

             if (maxth > 0)

             {

              Sleep(100);

              playx();

              continue;

             }

             else break;

            }

            printf("\r\n");

            return;

            }

            void customport(char *cp, char *cp2, char *cp3)

            {

            int intport;

            char *checker;

            startport = atoi(cp2);

            endport = atoi(cp2);

            if (strstr(cp2,"-"))

            {

             intport = atoi(checker = strchr(cp2, '-') + 1);

             if (intport > 0 && intport < 65536)

              endport = intport;

            }



            if (startport < 0 || startport > 65536 || endport < 0 || endport >

            65535)

            {

             usage(cp);

             exit(-1);  

            }

            setip2(cp3);

            }

            UINT portscan(LPVOID port)

            {  

            int addr = portip;

            int sock;

            struct fd_set mask;  

            struct timeval timeout;  

            struct sockaddr_in server;  

            unsigned long flag = 1;



            sock = socket(AF_INET, SOCK_STREAM, 0);



            if (sock == INVALID_SOCKET)

            {  

             printf("\r\nSock Error:%s", WSAGetLastError());

             maxth --;

             return -1;

            }



            server.sin_family=AF_INET;

            server.sin_addr.s_addr = htonl(addr); // ТЄЙЁГиµДµШЦ·

            server.sin_port = htons(short(port)); // ТЄЙЁГиµД¶ЛїЪ



            playx();



            if (ioctlsocket(sock, FIONBIO, &flag) != 0)

            {  

             printf("\r\nSock Error:%s", WSAGetLastError());

             closesocket(sock);

             maxth --;

             return -1;

            }



            connect(sock, (struct sockaddr*)&server, sizeof(server));



            timeout.tv_sec = 18;

            timeout.tv_usec = 0;  

            FD_ZERO(&mask);

            FD_SET(sock, &mask);



            switch(select(sock + 1, ZERO, &mask, ZERO, &timeout))

            {

            case -1:

             {  

              printf("\r\nSelect() error");

              maxth --;

              return -1;

             }



            case 0:  

             {

              maxth --;

              closesocket(sock);   

              return -1;

             }



            default:

             if(FD_ISSET(sock, &mask))

             {   

              shutdown(sock, 0);



              printf(" [Found:] %s Port: %d open.\r\n",

            inet_ntoa(server.sin_addr), ntohs(server.sin_port));    



              closesocket(sock);   

              scanok ++;  

              maxth --;   

              return 1;

             }

            }

            return 0;

            }

            void portscannow(int xp)

            {

            int sport;

            char *timenow, timebuf[32];

            char *ports[32]={

             "21",

             "22",

             "23",

             "25",

             "53",

             "79",

             "80",

             "110",

             "111",

             "113",

             "123",

             "135",

             "139",

             "143",

             "443",

             "512",

             "513",

             "514",

             "515",

             "540",

             "1080",

             "1433",

             "1521",

             "1524",

             "3306",

             "3389",

             "5631",

             "6000",

             "6112",

             "8000",

             "8080",

             "12345"

            };



            timenow = _strtime(timebuf);

            printf("\r\nPortScan Start Time: %s\r\n\n",timenow);



            maxth = 0;

            scanok = 0;

            scannum = 0;

            searched = 0;



            searchnum = hoststop - hoststart +1;

            if(xp == 3)

             searchnum = searchnum * 32;

            if(xp == 4)

             searchnum = searchnum * (endport - startport +1);



            for (portip = hoststart; portip <= hoststop; portip ++, scannum ++)

            {

             if ((portip % 256) == 0 || (portip % 256) == 255)  

             {    

              if(xp == 3)

              searchnum = searchnum - 32;

              if(xp == 4)

              searchnum = searchnum - (endport - startport +1);

              scannum --;

              playx();

              continue;

             }

              

             if(i > 11) i = 0;

             // scan 192.168.0.1

             // scan 192.168.0.1-192.168.0.254

             if (xp == 3)

             {

              for (sport = 0; sport < 32; sport ++, maxth ++, searched ++)

              {    

              TestThread(180);   

              CWinThread * pthread =

            AfxBeginThread(portscan,LPVOID(atoi((char*)ports[sport])));

              Sleep(120);    

              }    

             }

              

             //

             // scan -p 21 192.168.0.1

             // scan -p 21-80 192.168.0.1-192.168.0.254

             if (xp == 4)

             {

              sport = endport - startport;

              if(sport > 500 )

              {

              for(sport = startport; sport <= endport; sport ++, maxth ++,

            searched ++)

              {

               TestThread(2000);

               CWinThread * pthread = AfxBeginThread(portscan, LPVOID(sport));

               Sleep(10);  

              }

              }

              else

              {

              for(sport = startport; sport <= endport; sport ++, maxth ++,

            searched ++)

              {

               TestThread(250);

               CWinThread * pthread = AfxBeginThread(portscan, LPVOID(sport));

               Sleep(100);    

               playx();

              }

              }

             }  

            }

            WaitThreadEnd();  

            timenow = _strtime(timebuf);

            printf("\r\nPortScan End Time: %s", timenow);

            printf("\r\nScan %d Hosts completed. Open %d Ports!\r\n", scannum,

            scanok);

            }
Страницы: 1
Читают тему