This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Part II: Dictionary attacks | |
C program to use a dictionary to generate passwords and hashes. This program will also display the entropy for each password it generates. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#if defined(__APPLE__) | |
#define COMMON_DIGEST_FOR_OPENSSL | |
#include <CommonCrypto/CommonDigest.h> | |
#define SHA1 CC_SHA1 | |
#else | |
#include <openssl/md5.h> | |
#endif |