4
votes
Accepted
string comparison & crack.c
If you read the man page of the crypt function it says in one point:
The return value
points to static data whose content is overwritten by
each call.
So the first time you ...
3
votes
Accepted
Hacker2, Crack: Optimisations
For instance, the brute force search will at some point generate the
same character sequences as in the dictionary, but how would the
program know to avoid re-checking these same values without ...
2
votes
Accepted
What's the purpose of the 'salt' string? Isn't it contained in the hashed string anyway?
The salt is used to influence the encryption process. If you call crypt twice on the same key passing in different salt each time, you'll get different hashes (results).
The salt can be any two ...
2
votes
Accepted
Reading a line from a file
First consider the size this elements have in the cs50 appliance.
char = 1byte
char* (pointer) = 4bytes
You are declaring word and initializing it with the pointer returned by malloc, that is fine. ...
2
votes
Accepted
About the 'crack.c' part of the second hacker edition pset, what is really expected from us? (and a part about submitting)
So I'm wondering if submitting a program that would work but can't be actually tested is okay and is what is expected from us
It is expected of you to find all the plaintext passwords of the hashed ...
1
vote
Accepted
Pset2 Hacker Edition- Crack.c
I think I solved it. It seems that I was overwriting my pointer to my allocated memory with another pointer (when I assigned attempt the output of the crypt function (another pointer - to the encoded ...
1
vote
Accepted
(Hacker2) Why am I getting a seg fault here from fgets?
Not really. The cause of the error involves some topics that you will study later in the course. I'll try to simplify my answer as much as possible, but don't panic if you don't fully understand what ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
hacker2 × 13crack × 9
pset2 × 3
c × 2
initials × 2
cs50x × 1
segmentation-fault × 1
dictionary × 1
fails-check50-but-works × 1
submissions × 1
crypt × 1
file × 1
hacker × 1
size × 1