-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathguess_the_paswd.c
64 lines (50 loc) · 1.22 KB
/
guess_the_paswd.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//Reverse_Engineering game
//Created by :- Rajneesh K. Arya
#include <stdio.h>
#include <string.h>
int eval(){
int a = (((((((10 / 10) + 10)/10)-10)*10)-10)/10)+10;
further(a);
}
int further(int a){
a = (((a+sizeof(int)+sizeof(char))*10)-20)/10;
return a;
}
int main(){
char hash[20] = "r81o26g91g44u71lyh";
char salt[12] = "8126914471";
char new_pass[19];
char int_pass[9];
int l = strlen(hash);
int sl = strlen(salt);
printf("Your Task is to guess the password (HINT : Analyse the code to retrieve the password)\n\n");
printf("Password:");
fgets(int_pass,9,stdin);
int i=0,j=0,k=0;
while(i<l){
if(i%3==0 || i == 0){
new_pass[i] = int_pass[j] + eval();
j++;
}
else{
if(k<10){
new_pass[i] = salt[k];
k++;
}
else{
new_pass[i] = int_pass[j] + eval();
j++;
}
}
i++;
}
new_pass[l] = '\0';
int ans = strcmp(hash,new_pass);
if(!ans){
printf("YOu got a correct Answer\n");
}
else{
printf("Wrong Answer !!!!\nYou need more Practice\n");
}
return 0;
}