Questions tagged [crack.c]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
105 views

How to generate passwords in Crack Pset 2?

Another question about Crack in pset2. Can I have passwords that are mixed with both lowercase and uppercase letters? Like: “PIzzA”? If so, I’m a little confused on how to write the code to get all ...
0
votes
1answer
71 views

Question about Crack in PSET2

My questions about Crack are: Before we pass in salt do we have to define it ourselves? For example, since it's a 2 digit number do we create a method that produces random numbers for salt or does it ...
0
votes
1answer
93 views

crack.c: No response 😒

When I run my crack.c, the program never responds. It just sits there and wastes time. I even tried debugging it on the CS50 IDE, and it was normal. Here is my code: #include <cs50.h> #include &...
0
votes
1answer
981 views

crack.c: UndefinedBehaviorSanitizer:DEADLYSIGNAL --SOLVED--

When I run my code: #include <cs50.h> #include <stdio.h> #include <crypt.h> #include <string.h> string crack(string hashed); string deleteAll(string s, char target); // ...
0
votes
2answers
175 views

pset2 crack: Takes too long

My code takes like 1-2 minutes to execute, and the result is always Killed. Here is my code: #include <cs50.h> #include <stdio.h> #include <crypt.h> #include <string.h> ...
0
votes
1answer
44 views

my crack.c actually works, but doesnt give away the key! Pset2

I am trying to figure out how to solve the crack problem from pset2, everything works fine with compiling but when I try to crack the hash from the example 50cI2vYkF0YU2 which is Zamayla's ...
0
votes
1answer
103 views

Basic use of crypt in crack.c? (Hash “ROLF”)

Here is a quick test case for crack direct from the CS50 AP material, $ ./crack 50fkUxYHbnXGw ROFL Here is my code, #define _XOPEN_SOURCE #include <unistd.h> #include <stdio.h> int ...
0
votes
1answer
501 views

crack.c: error: implicit declaration of function 'crypt' is invalid in C99

When I try to compile with clang -ggdb3 -O0 -std=c11 -Wall -Werror -Wshadow crack.c -lcrypt -lcs50 -lm -o crack I get crack.c: error: implicit declaration of function 'crypt' is invalid in C99 [-...
1
vote
1answer
3k views

pset2: Crack takes a lot of time

I take an average of 20 minutes to crack the password and some people are saying it can be done in less than 30 seconds, I have been trying to find out why my code takes that much time but I can't. #...
0
votes
1answer
109 views

PSET 2 - CRACK - Does not give output/program loops seemingly forever

I managed to get the program to output some of the passwords but not all. For some of the hashes I use as input, the program executes seemingly forever. (haven't let it go on longer than 4 mins) Any ...
0
votes
1answer
334 views

My crack code works for rofl but not for all

My crack code works for the rofl code but not for all I tried two other codes and I don't know why was it not able to crack thos codes even when I increased my range of characters for search #define ...
2
votes
2answers
226 views

PSET2, crack.c Did this problem fall out of the sky from week 115? Am I overthinking this?

This is the spec: Specification Design and implement a program, crack, that cracks passwords. Implement your program in a file called crack.c in a directory called crack. Your ...
0
votes
1answer
482 views

CS50 2017 crack.c not working properly

Can't understand why my code is not working. Tried 2 different loops to arrive at the solution but the first one does not arrive at anything and keeps on going: #include <stdio.h> //#include &...
0
votes
2answers
525 views

PSET2: Can't figure out what's wrong with my crack.c code?

I've been trying to get my crack code working for days now. It took me a while to even understand the problem but I think I have somewhat of a handle on it now. My code compiles completely fine but ...
0
votes
1answer
175 views

pset2 crack.c, competence question

Thank in advance for any reply, Im currently on crack.c in pset2, I have so far completed all other problems leading to this one. It seems like this problem is a few notches more advance then the ...
0
votes
0answers
371 views

Crack.c in PSet2 - is strcmp() necessary? & other questions

So I've been stuck on crack.c for two weeks now (not literally - I have a full time job too ha) and on top of having 50 questions about it, I just can't get my head round the solution! Basically I ...
0
votes
1answer
2k views

strcmp not evaluating as expected

I'm having trouble with a key section of my code where, for some reason that is beyond my skill level at this point, it is not comparing properly. For some reason it's evaluating to true for the wrong ...
0
votes
1answer
124 views

crack.c something weird is happening to the generated keys

This is how I am generating all of the keys and checking them (for debugging purposes I'm printing them out too) char salt[] = "50"; char key[4] = { 0 }; char alphabet[] = "...
0
votes
1answer
520 views

crack.c pset2, second parameter of 'main' (argument array) must be of type 'char **'

I'm trying to initialize main like this int main(int argc, char argv[]) so I can pass "argv" and the crypt() result to strcmp() like this if (strcmp(argv, crypt(password, salt)) == 0) { ...
0
votes
1answer
246 views

cs50 pset2- crack.c gives me a segmentation fault

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 ...