Here's the program:
#define _XOPEN_SOURCE
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <cs50.h>
int main()
{
string salt = "50";
string test;
string crack = GetString();
string hash;
char a = "";
for(int i = 97; i <= 123; i++)
{
char b = "";
for(int j = 97; j <= 123; j++)
{
char c = "";
for(int k = 97; k <= 123; j++)
{
char d = "";
for(int l = 97; l <= 123; j++)
{
test = (a + b + c + d);
hash = crypt(test, salt);
if (strcmp(hash, crack))
{
printf("%s", test);
exit(0);
}
d = (char)l;
}
c = (char)k;
}
b = (char)j;
}
a = (char)i;
}
}
I compiled it using "gcc -o crack crack.c -lcrypt -lcs50".
How do I fix it? I'm kinda new to this. xD
Thanks in advance!