home *** CD-ROM | disk | FTP | other *** search
- /* Author: www.asmbeginer.com; nickname: putois , cheoles
- from:france */
- /* PYROSCAN date: 05/10/2000 write for
- pyrofreak.org */
- /* Compile: cc -o pyro
- pyro12.c */
- /* Version : 1.2 Add errors
- messages */
- /*
- */
- /* Usage: ./pyro 127.0.0.1
- -cold */
- /* ./pyro 127.0.0.1
- -lotus */
- /* ./pyro 127.0.0.1
- -omni */
- /* ./pyro 127.0.0.1
- -winnt */
- /* ./pyro 127.0.0.1
- -cgi */
- /*
- */
- /* See also: ./pyro 127.0.0.1 -cold
- >result.txt */
-
- #include <stdio.h>
- #include <string.h>
- #include <netdb.h>
- #include <netinet/in.h>
-
-
- int main(int argc, char **argv)
- {
- struct in_addr addr;
- struct sockaddr_in sin;
- struct hostent *he;
- unsigned start,end,counter;
- char *cld[34],*lts[11],*omni[13],*wnt[116],*cgi[22];
- char
- coldbuff[1024],lotusbuff[1024],omnibuff[1024],winntbuff[1024],cgibuff[1024];
- char msg[200];
-
-
- int sock,fusion,domino,httpd,daube,cgbin,fs=0,dm=0,ht=0,db=0,cb=0;
-
- cld[1] = "GET /cfdocs/zero.cfm HTTP/1.0\n\n";
- cld[2] = "GET /cfdocs/root.cfm HTTP/1.0\n\n";
- cld[3] = "GET /cfdocs/expressions.cfm HTTP/1.0\n\n";
- cld[4] = "GET /cfdocs/TOXIC.CFM HTTP/1.0\n\n";
- cld[5] = "GET /cfdocs/MOLE.CFM HTTP/1.0\n\n";
- cld[6] = "GET /cfdocs/expeval/exprcalc.cfm HTTP/1.0\n\n";
- cld[7] = "GET /cfdocs/expeval/sendmail.cfm HTTP/1.0\n\n";
- cld[8] = "GET /cfdocs/expeval/eval.cfm HTTP/1.0\n\n";
- cld[9] = "GET /cfdocs/expeval/openfile.cfm HTTP/1.0\n\n";
- cld[10] = "GET /cfdocs/displayopenedfile.cfm HTTP/1.0\n\n";
- cld[11] = "GET /cfdocs/exampleapp/publish/admin/addcontent.cfm
- HTTP/1.0\n\n";
- cld[12] = "GET /cfdocs/exampleapp/email/getfile.cfm HTTP/1.0\n\n";
- cld[13] = "GET /cfdocs/exampleapp/publish/admin/application.cfm
- HTTP/1.0\n\n";
- cld[14] = "GET /cfdocs/exampleapp/email/application.cfm HTTP/1.0\n\n";
- cld[15] = "GET /cfdocs/exampleapp/docs/sourcewindow.cfm HTTP/1.0\n\n";
- cld[16] = "GET /cfdocs/examples/parks/detail.cfm HTTP/1.0\n\n";
- cld[17] = "GET /cfdocs/examples/cvbeans/beaninfo.cfm HTTP/1.0\n\n";
- cld[18] = "GET /cfdocs/cfmlsyntaxcheck.cfm HTTP/1.0\n\n";
- cld[19] = "GET /cfdocs/snippets/viewexample.cfm HTTP/1.0\n\n";
- cld[20] = "GET /cfdocs/snippets/gettempdirectory.cfm HTTP/1.0\n\n";
- cld[21] = "GET /cfdocs/snippets/fileexists.cfm HTTP/1.0\n\n";
- cld[22] = "GET /cfdocs/snippets/evaluate.cfm HTTP/1.0\n\n";
- cld[23] = "GET /cfappman/index.cfm HTTP/1.0\n\n";
- cld[24] = "GET /cfusion/cfapps/forums/forums_.mdb HTTP/1.0\n\n";
- cld[25] = "GET /cfusion/cfapps/security/realm_.mdb HTTP/1.0\n\n";
- cld[26] = "GET /cfusion/cfapps/forums/data/forums.mdb HTTP/1.0\n\n";
- cld[27] = "GET /cfusion/cfapps/security/data/realm/mdb HTTP/1.0\n\n";
- cld[28] = "GET /cfusion/database/cfexamples.mdb HTTP/1.0\n\n";
- cld[29] = "GET /cfusion/database/cfsnippets.mdb HTTP/1.0\n\n";
- cld[30] = "GET /cfusion/database/smpolicy.mdb HTTP/1.0\n\n";
- cld[31] = "GET /cfusion/database/cypress.mdb HTTP/1.0\n\n";
-
- lts[1] = "GET /database.nsf/e1466a8590/6048076233?OpenDocument
- HTTP/1.0\n\n";
- lts[2] = "GET /database.nsf/e1466a8590/6048076233?EditDocument
- HTTP/1.0\n\n";
- lts[3] = "GET /database.nsf/e1466a8590/6048076233?DeleteDocument
- HTTP/1.0\n\n";
- lts[4] = "GET /database.nsf/viewname? HTTP/1.0\n\n";
- lts[5] = "GET /domcfg.nsf/?open HTTP/1.0\n\n";
- lts[6] = "GET /domcfg.nsf/URLRedirect/?OpenForm HTTP/1.0\n\n";
- lts[7] = "GET /domlog.nsf/ HTTP/1.0\n\n";
- lts[8] = "GET /catalog.nsf/ HTTP/1.0\n\n";
- lts[9] = "GET /names.nsf/ HTTP/1.0\n\n";
- lts[10] = "GET /database.nsf/ HTTP/1.0\n\n";
- lts[11] = "GET /today.nsf/ HTTP/1.0\n\n";
-
- omni[1] = "GET /cgi-bin/cgi-lib.pl HTTP/1.0\n\n";
- omni[2] = "GET /cgi-bin/imagemap.c HTTP/1.0\n\n";
- omni[3] = "GET /cgi-bin/imagemap.exe HTTP/1.0\n\n";
- omni[4] = "GET /cgi-bin/minimal.exe HTTP/1.0\n\n";
- omni[5] = "GET /cgi-bin/redir.exe HTTP/1.0\n\n";
- omni[6] = "GET /cgi-bin/stats.prg HTTP/1.0\n\n";
- omni[7] = "GET /cgi-bin/statsconfig HTTP/1.0\n\n";
- omni[8] = "GET /cgi-bin/visitor.exe HTTP/1.0\n\n";
- omni[9] = "GET /cgi-win/wincgi.bat HTTP/1.0\n\n";
- omni[10] = "GET /cgi-bin/htmldocs/ HTTP/1.0\n\n";
- omni[12] = "GET /cgi-bin/icons/ HTTP/1.0\n\n";
- omni[13] = "GET /cgi-bin/logs/ HTTP/1.0\n\n";
-
- wnt[1] = "GET /scripts/ HTTP/1.0\n\n";
- wnt[2] = "GET /Default.asp HTTP/1.0\n\n";
- wnt[3] = "GET /_vti_bin/ HTTP/1.0\n\n";
- wnt[4] = "GET /_vti_bin/_vti_adm HTTP/1.0\n\n";
- wnt[5] = "GET /_vti_bin/_vti_aut HTTP/1.0\n\n";
- wnt[6] = "GET /cgi-bin/ HTTP/1.0\n\n";
- wnt[7] = "GET /srchadm/ HTTP/1.0\n\n";
- wnt[8] = "GET /iisadmin/ HTTP/1.0\n\n";
- wnt[9] = "GET /_AuthChangeUrl? HTTP/1.0\n\n";
- wnt[10] = "GET /_vti_inf.html HTTP/1.0\n\n";
- wnt[11] = "GET ?PagesServices HTTP/1.0\n\n";
- wnt[12] = "GET /html/?PageServices HTTP/1.0\n\n";
- wnt[13] = "GET /scripts/cpshost.dll HTTP/1.0\n\n";
- wnt[14] = "GET /scripts/uploadn.asp HTTP/1.0\n\n";
- wnt[15] = "GET /scripts/uploadx.asp HTTP/1.0\n\n";
- wnt[16] = "GET /scripts/upload.asp HTTP/1.0\n\n";
- wnt[17] = "GET /scripts/repost.asp HTTP/1.0\n\n";
- wnt[18] = "GET /scripts/postinfo.asp HTTP/1.0\n\n";
- wnt[19] = "GET /scripts/run.exe HTTP/1.0\n\n";
- wnt[20] = "GET /ftproot/ HTTP/1.0\n\n";
- wnt[21] = "GET /gophroot/ HTTP/1.0\n\n";
- wnt[22] = "GET /scripts/iisadmin/adv.htr HTTP/1.0\n\n";
- wnt[23] = "GET /scripts/iisadmin/advadd.htr HTTP/1.0\n\n";
- wnt[24] = "GET /scripts/iisadmin/advaddu.htr HTTP/1.0\n\n";
- wnt[25] = "GET /scripts/iisadmin/advaddg.htr HTTP/1.0\n\n";
- wnt[26] = "GET /scripts/iisadmin/advaddgu.htr HTTP/1.0\n\n";
- wnt[27] = "GET /scripts/iisadmin/advded.htr HTTP/1.0\n\n";
- wnt[28] = "GET /scripts/iisadmin/advdeg.htr HTTP/1.0\n\n";
- wnt[29] = "GET /scripts/iisadmin/advdeny.htr HTTP/1.0\n\n";
- wnt[30] = "GET /scripts/iisadmin/advdeny2.htr HTTP/1.0\n\n";
- wnt[31] = "GET /scripts/iisadmin/advedd.htr HTTP/1.0\n\n";
- wnt[32] = "GET /scripts/iisadmin/adveddu.htr HTTP/1.0\n\n";
- wnt[33] = "GET /scripts/iisadmin/advgrant.htr HTTP/1.0\n\n";
- wnt[34] = "GET /scripts/iisadmin/advu.htr HTTP/1.0\n\n";
- wnt[35] = "GET /scripts/iisadmin/bdir.htr HTTP/1.0\n\n";
- wnt[36] = "GET /scripts/iisadmin/conn.htr HTTP/1.0\n\n";
- wnt[37] = "GET /scripts/iisadmin/dir.htr HTTP/1.0\n\n";
- wnt[38] = "GET /scripts/iisadmin/diradd.htr HTTP/1.0\n\n";
- wnt[39] = "GET /scripts/iisadmin/diraddu.htr HTTP/1.0\n\n";
- wnt[40] = "GET /scripts/iisadmin/dirdel.htr HTTP/1.0\n\n";
- wnt[41] = "GET /scripts/iisadmin/dirdt.htr HTTP/1.0\n\n";
- wnt[42] = "GET /scripts/iisadmin/dirdtu.htr HTTP/1.0\n\n";
- wnt[43] = "GET /scripts/iisadmin/diru.htr HTTP/1.0\n\n";
- wnt[44] = "GET /scripts/iisadmin/dirv.htr HTTP/1.0\n\n";
- wnt[45] = "GET /scripts/iisadmin/disc.htr HTTP/1.0\n\n";
- wnt[46] = "GET /scripts/iisadmin/disca.htr HTTP/1.0\n\n";
- wnt[47] = "GET /scripts/iisadmin/log.htr HTTP/1.0\n\n";
- wnt[48] = "GET /scripts/iisadmin/logu.htr HTTP/1.0\n\n";
- wnt[49] = "GET /scripts/iisadmin/msg.htr HTTP/1.0\n\n";
- wnt[50] = "GET /scripts/iisadmin/msgu.htr HTTP/1.0\n\n";
- wnt[51] = "GET /scripts/iisadmin/serv.htr HTTP/1.0\n\n";
- wnt[52] = "GET /scripts/iisadmin/servu.htr HTTP/1.0\n\n";
- wnt[53] = "GET /scripts/iisadmin/samples/ctgestb.htx HTTP/1.0\n\n";
- wnt[54] = "GET /scripts/iisadmin/samples/ctgestb/idc HTTP/1.0\n\n";
- wnt[55] = "GET /scripts/iisadmin/samples/details.htx HTTP/1.0\n\n";
- wnt[56] = "GET /scripts/iisadmin/samples/query.htx HTTP/1.0\n\n";
- wnt[57] = "GET /scripts/iisadmin/samples/query.idc HTTP/1.0\n\n";
- wnt[58] = "GET /scripts/iisadmin/samples/register.htx HTTP/1.0\n\n";
- wnt[59] = "GET /scripts/iisadmin/samples/register.idc HTTP/1.0\n\n";
- wnt[60] = "GET /scripts/iisadmin/samples/sample.htx HTTP/1.0\n\n";
- wnt[61] = "GET /scripts/iisadmin/samples/sample.idc HTTP/1.0\n\n";
- wnt[62] = "GET /scripts/iisadmin/samples/sample2.htx HTTP/1.0\n\n";
- wnt[63] = "GET /scripts/iisadmin/samples/sample3.idc HTTP/1.0\n\n";
- wnt[64] = "GET /scripts/iisadmin/samples/viewbook.htx HTTP/1.0\n\n";
- wnt[65] = "GET /scripts/iisadmin/samples/viewbook.idc HTTP/1.0\n\n";
- wnt[66] = "GET /scripts/iisadmin/tools/ct.htx HTTP/1.0\n\n";
- wnt[67] = "GET /scripts/iisadmin/tools/ctss.idc HTTP/1.0\n\n";
- wnt[68] = "GET /scripts/iisadmin/tools/dsnform.exe HTTP/1.0\n\n";
- wnt[69] = "GET /scripts/iisadmin/tools/getdrvrs.exe HTTP/1.0\n\n";
- wnt[70] = "GET /scripts/iisadmin/tools/mkilog.exe HTTP/1.0\n\n";
- wnt[71] = "GET /scripts/iisadmin/tools/newdsn.exe HTTP/1.0\n\n";
- wnt[72] = "GET /IISADMPWD/achg.htr HTTP/1.0\n\n";
- wnt[73] = "GET /IISADMPWD/aexp.htr HTTP/1.0\n\n";
- wnt[74] = "GET /IISADMPWD/aexp2.htr HTTP/1.0\n\n";
- wnt[75] = "GET /IISADMPWD/aexp2b.htr HTTP/1.0\n\n";
- wnt[76] = "GET /IISADMPWD/aexp3.htr HTTP/1.0\n\n";
- wnt[77] = "GET /IISADMPWD/aexp4.htr HTTP/1.0\n\n";
- wnt[78] = "GET /IISADMPWD/aexp4b.htr HTTP/1.0\n\n";
- wnt[79] = "GET /IISADMPWD/anot.htr HTTP/1.0\n\n";
- wnt[80] = "GET /IISADMPWD/anot3.htr HTTP/1.0\n\n";
- wnt[81] = "GET /_vti_pvt/writeto.cnf HTTP/1.0\n\n";
- wnt[82] = "GET /_vti_pvt/avcacl.cnf HTTP/1.0\n\n";
- wnt[83] = "GET /_vti_pvt/services.cnf HTTP/1.0\n\n";
- wnt[84] = "GET /_vti_pvt/service.stp HTTP/1.0\n\n";
- wnt[85] = "GET /_vti_pvt/service.cnf HTTP/1.0\n\n";
- wnt[86] = "GET /_vti_pvt/access.cnf HTTP/1.0\n\n";
- wnt[87] = "GET /_private/registrations.txt HTTP/1.0\n\n";
- wnt[88] = "GET /_private/registrations.htm HTTP/1.0\n\n";
- wnt[89] = "GET /_private/register.txt HTTP/1.0\n\n";
- wnt[90] = "GET /_private/orders.txt HTTP/1.0\n\n";
- wnt[91] = "GET /_private/orders.htm HTTP/1.0\n\n";
- wnt[92] = "GET /_private/form_results.htm HTTP/1.0\n\n";
- wnt[93] = "GET /_private/form_results.txt HTTP/1.0\n\n";
- wnt[94] = "GET /admisapi/fpadmin.htm HTTP/1.0\n\n";
- wnt[96] = "GET /scripts/Fpadmcgi.exe HTTP/1.0\n\n";
- wnt[97] = "GET /_vti_bin/shtml.dll HTTP/1.0\n\n";
- wnt[98] = "GET /_vti_bin/_vti_aut/author.dll HTTP/1.0\n\n";
- wnt[99] = "GET /_vti_bin/_vti_adm/admin.dll HTTP/1.0\n\n";
- wnt[100] = "GET /msads/Samples/selector/showcode.asp HTTP/1.0\n\n";
- wnt[101] = "GET /scripts/perl? HTTP/1.0\n\n";
- wnt[102] = "GET /scripts/proxy/w3proxy.dll HTTP/1.0\n\n";
- wnt[103] = "GET /iissamples/sdk/asp/docs/codebrws.asp HTTP/1.0\n\n";
- wnt[104] = "GET /iissamples/exair/howitworks/codebrws.asp HTTP/1.0\n\n";
- wnt[105] = "GET /scripts/CGImail.exe HTTP/1.0\n\n";
- wnt[106] = "GET /AdvWorks/equipement/catalog_type.asp HTTP/1.0\n\n";
- wnt[107] = "GET /scripts/iisadmin/default.htm HTTP/1.0\n\n";
- wnt[108] = "GET /msadc/samples/adctest.asp HTTP/1.0\n\n";
- wnt[109] = "GET /adsamples/config/site.csc HTTP/1.0\n\n";
- wnt[110] = "GET /scripts/../../cmd.exe HTTP/1.0\n\n";
- wnt[111] = "GET /scripts/cpshost.dll HTTP/1.0\n\n";
- wnt[112] = "GET /scripts/convert.bat HTTP/1.0\n\n";
- wnt[113] = "GET /msadc/msadcs.dll HTTP/1.0\n\n";
- wnt[114] = "GET /publisher/ HTTP/1.0\n\n";
- wnt[115] = "GET /..../Windows/Admin.pwl HTTP/1.0\n\n";
- wnt[116] = "GET ....../......ida/con HTTP/1.0\n\n";
-
-
- cgi[1] = "GET /cgi-bin/AT-generate.cgi HTTP/1.0\n\n";
- cgi[2] = "GET /cgi-bin/anyform.cgi HTTP/1.0\n\n";
- cgi[3] = "GET /cgi-bin/aglimpse HTTP/1.0\n\n";
- cgi[4] = "GET /cgi-bin/bnbform.cgi HTTP/1.0\n\n";
- cgi[4] = "GET /cgi-bin/campas HTTP/1.0\n\n";
- cgi[5] = "GET /cgi-bin/carbo HTTP/1.0\n\n";
- cgi[6] = "GET /cgi-bin/classifieds.cgi HTTP/1.0\n\n";
- cgi[7] = "GET /cgi-bin/Count.cgi HTTP/1.0\n\n";
- cgi[8] = "GET /cgi-bin/dumenv.pl HTTP/1.0\n\n";
- cgi[9] = "GET /cgi-bin/environ.cgi HTTP/1.0\n\n";
- cgi[10] = "GET /cgi-bin/file.pl HTTP/1.0\n\n";
- cgi[11] = "GET /cgi-bin/faxsurvey.cgi HTTP/1.0\n\n";
- cgi[12] = "GET /cgi-bin/formail HTTP/1.0\n\n";
- cgi[13] = "GET /cgi-bin/wguest.exe HTTP/1.0\n\n";
- cgi[14] = "GET /cgi-bin/handler HTPP/1.0\n\n";
- cgi[15] = "GET /cgi-bin/htmlscript HTTP/1.0\n\n";
- cgi[16] = "GET /info2www HTTP/1.0\n\n";
- cgi[17] = "GET /cgi-bin/test-cgi HTTP/1.0\n\n";
- cgi[18] = "GET /cgi-bin/perl.exe HTTP/1.0\n\n";
- cgi[19] = "GET /cgi-bin/pfdisplay.cgi HTTP\n\n";
- cgi[20] = "GET /cgi-bin/phf HTTP/1.0\n\n";
- cgi[21] = "GET /cgi-bin/php.cgi HTTP/1.0\n\n";
- cgi[22] = "GET /cgi-bin/script.pl HTTP/1.0\n\n";
-
-
-
- if(argc < 2){
- system("clear");
- printf("\n\n\n\n");
- printf("\t\t\tWelcome to pyroscan !!\n");
- printf("\t\t Write by www.asmbeginer.com \n");
- printf("\n\n\n\n\n\n\n\n\n\n");
- printf("Usage: %s <ip> -cold scan for coldfusion\n", argv[0]);
- printf("Usage: %s <ip> -lotus scan for lotus dominos\n",
- argv[0]);
- printf("Usage: %s <ip> -omni scan for omnihttpd\n", argv[0]);
- printf("Usage: %s <ip> -winnt scan for frontpage\n", argv[0]);
- printf("Usage: %s <ip> -cgi scan for /cgi-bin/ \n", argv[0]);
- exit(0);
- }
-
- if ((he=gethostbyname (argv[1])) == NULL)
- {
- perror("hots not found\n");
- exit(0);
- }
-
- start=inet_addr(argv[1]);
- counter=ntohl(start);
-
- sock=socket(AF_INET,SOCK_STREAM, 0);
- bcopy(he->h_addr, (char *)&sin.sin_addr, he->h_length);
- sin.sin_family=AF_INET;
- sin.sin_port=htons(80);
-
- if (connect(sock, (struct sockaddr *)&sin, sizeof(sin)) != 0)
- {
- perror("can't creat a connection\n");
- }
-
- if(argc >= 3){
- if(strcmp(argv[2], "-cold") == 0){
- while(fs++ < 31)
- {
- sock=socket(AF_INET,SOCK_STREAM, 0);
- bcopy(he->h_addr, (char *)&sin.sin_addr, he->h_length);
- sin.sin_family=AF_INET;
- sin.sin_port=htons(80);
- if (connect(sock, (struct sockaddr*)&sin, sizeof(sin)) != 0)
- {
- perror("connect");
- }
-
- for(fusion=0; fusion < 1024;fusion++)
- {
- coldbuff[fusion] = '\0';
- }
-
- send(sock,cld[fs],strlen(cld[fs]),0);
- recv(sock,coldbuff,sizeof(coldbuff),0);
- cld[fs] = strstr(coldbuff,msg);
- if (cld[fs] != NULL)
- printf(cld[fs],"found \n");
- else
- printf(cld[fs],"not found \n");
-
- close(sock);
- }
- }
-
- if(argc >= 3){
- if(strcmp(argv[2], "-lotus") == 0){
- while(dm++ < 12)
- {
- sock=socket(AF_INET, SOCK_STREAM, 0);
- bcopy(he->h_addr, (char *)&sin.sin_addr, he->h_length);
- sin.sin_family=AF_INET;
- sin.sin_port=htons(80);
- if(connect(sock, (struct sockaddr*)&sin, sizeof(sin)) != 0)
- {
- perror("connect");
- }
- for(domino=0; domino < 1024; domino++)
- {
- lotusbuff[domino] = '\0';
- }
- send(sock,lts[dm],strlen(lts[dm]),0);
- recv(sock,lotusbuff,sizeof(lotusbuff),0);
- lts[dm] = strstr(lotusbuff,msg);
- if (lts[dm] != NULL)
- printf(lts[dm],"found \n");
- else
- printf(lts[dm],"not found \n");
- }
- }
-
- if(argc >= 3){
- if(strcmp(argv[2], "-omni") == 0){
- while(ht++ < 13)
- {
- sock=socket(AF_INET,SOCK_STREAM, 0);
- bcopy(he->h_addr, (char*)&sin.sin_addr, he->h_length);
- sin.sin_family=AF_INET;
- sin.sin_port=htons(80);
- if (connect(sock, (struct sockaddr*)&sin, sizeof(sin)) != 0)
- {
- perror("connect");
- }
- for(httpd=0; httpd < 1024; httpd++)
- {
- omnibuff[httpd] = '\0';
- }
- send(sock, omni[ht],strlen(omni[ht]),0);
- recv(sock, omnibuff, sizeof(omnibuff),0);
- omni[ht] = strstr(omnibuff,msg);
- if (omni[ht] != NULL)
- printf(omni[ht],"found \n");
- else
- printf(omni[ht],"not found \n");
- }
- }
-
- if(argc >= 3){
- if(strcmp(argv[2], "-winnt") == 0){
- while(db++ < 116)
- {
- sock=socket(AF_INET,SOCK_STREAM, 0);
- bcopy(he->h_addr, (char *)&sin.sin_addr, he->h_length);
- sin.sin_family=AF_INET;
- sin.sin_port=htons(80);
- if (connect(sock, (struct sockaddr*)&sin, sizeof(sin)) != 0)
- {
- perror("connect");
- }
- for (daube=0; daube < 1024; daube++)
- {
- winntbuff[daube] = '\0';
- }
- send(sock, wnt[db],strlen (wnt[db]),0);
- recv(sock, winntbuff, sizeof(winntbuff),0);
- wnt[db] = strstr(winntbuff,msg);
- if (wnt[db] != NULL)
- printf(wnt[db],"found \n");
- else
- printf(wnt[db],"not found \n");
- close(sock);
- }
- }
-
- if(argc >= 3){
- if(strcmp(argv[2], "-cgi") == 0){
- while(cb++ < 22)
- {
- sock=socket(AF_INET,SOCK_STREAM, 0);
- bcopy(he->h_addr, (char *)&sin.sin_addr, he->h_length);
- sin.sin_family=AF_INET;
- sin.sin_port=htons(80);
- if (connect(sock, (struct sockaddr*)&sin, sizeof(sin)) !=0)
- {
- perror("connect");
- }
- for (cgbin=0; cgbin < 1024; cgbin++)
- {
- cgibuff[cgbin] = '\0';
- }
- send(sock, cgi[cb],strlen(cgi[cb]),0);
- recv(sock, cgibuff, sizeof(cgibuff),0);
- cgi[cb] = strstr(cgibuff,msg);
- if (cgi[cb] != NULL)
- printf(cgi[cb],"found \n");
- else
- printf(cgi[cb], "not found \n");
- close(sock);
- }
- }
- }
- }
- }
- }
- }
- }
-
-
-