Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
2
votes
PSET2, crack.c Did this problem fall out of the sky from week 115? Am I overthinking this?
Crack is a 'more comfortable' problem, so it assumes that you have programming experience and that you have a knowledge of arrays, strings, loops, etc. If you don't consider yourself in the 'more com …
1
vote
Accepted
Basic use of crypt in crack.c? (Hash "ROLF")
Unfortunately, there was a typo in the spec. The first example given was correct:
./crack 50fkUxYHbnXGw
rofl
but when repeated later in the spec, it showed ROFL in error.
This has been correc …
0
votes
My crack code works for rofl but not for all
You don't appear to be handling passwords that are fewer than 4 chars.
edited to add example
You have 4 nested loops. Each one sets the value of the char but later chars in the string are not reset, …
1
vote
Accepted
crack.c: error: implicit declaration of function 'crypt' is invalid in C99
The spec is perfectly correct. More than likely, you don't have
#define _XOPEN_SOURCE
#include <unistd.h>
At the very top of your program (ie, before any other #includes). If you move that to th …
1
vote
Accepted
pset2 crack: Takes too long
Keep in mind that a "string" in C is simply a character array that is null terminated.
As such, your salt variable is not a string, nor is your temp variable in all cases.
As a consequence, when you …