diff --git a/include/hwmon.h b/include/hwmon.h index 6f5027259..d813611b8 100644 --- a/include/hwmon.h +++ b/include/hwmon.h @@ -6,6 +6,10 @@ #ifndef _HWMON_H #define _HWMON_H +#define GPU_TEMP_DISABLE 0 +#define GPU_TEMP_ABORT 90 +#define GPU_TEMP_RETAIN 75 + typedef struct { HM_ADAPTER_ADL adl; diff --git a/include/interface.h b/include/interface.h index 6f8df47c9..700303fef 100644 --- a/include/interface.h +++ b/include/interface.h @@ -12,6 +12,10 @@ #include #include +#define HASH_MODE 0 +#define HEX_SALT 0 +#define SEPARATOR ':' + /** * weak hashes shutcut */ diff --git a/include/logfile.h b/include/logfile.h index 92b3c908b..81ded9770 100644 --- a/include/logfile.h +++ b/include/logfile.h @@ -11,6 +11,8 @@ #include #include +#define LOGFILE_DISABLE 0 + // logfile_append() checks for logfile_disable internally to make it easier from here #define logfile_top_msg(msg) logfile_append ("%s\t%s", data.topid, (msg)); diff --git a/include/mpsp.h b/include/mpsp.h index 7c91b5c6e..28bbd3411 100644 --- a/include/mpsp.h +++ b/include/mpsp.h @@ -18,6 +18,17 @@ #define SP_ROOT_CNT (SP_PW_MAX * CHARSIZ) #define SP_MARKOV_CNT (SP_PW_MAX * CHARSIZ * CHARSIZ) +#define MARKOV_THRESHOLD 0 +#define MARKOV_DISABLE 0 +#define MARKOV_CLASSIC 0 + +#define HEX_CHARSET 0 +#define INCR_MASKS 1000 + +#define INCREMENT 0 +#define INCREMENT_MIN 1 +#define INCREMENT_MAX PW_MAX + typedef struct { uint cs_buf[0x100]; diff --git a/include/potfile.h b/include/potfile.h index ebf6f6ba9..6cf4d62c3 100644 --- a/include/potfile.h +++ b/include/potfile.h @@ -9,6 +9,8 @@ #include #include +#define SHOW 0 +#define LEFT 0 #define POTFILE_DISABLE 0 #define INCR_POT 1000 diff --git a/include/restore.h b/include/restore.h index fe2572229..6cd3f1deb 100644 --- a/include/restore.h +++ b/include/restore.h @@ -20,13 +20,17 @@ #include #endif // _WIN -#define RESTORE 0 -#define RESTORE_TIMER 60 -#define RESTORE_DISABLE 0 +#define RESTORE 0 +#define RESTORE_TIMER 60 +#define RESTORE_DISABLE 0 #define RESTORE_VERSION_MIN 320 #define RESTORE_VERSION_CUR 320 +#define SKIP 0 +#define LIMIT 0 +#define KEYSPACE 0 + typedef struct { int version; diff --git a/include/rp_cpu.h b/include/rp_cpu.h index f99ce4928..6af41f1dd 100644 --- a/include/rp_cpu.h +++ b/include/rp_cpu.h @@ -72,6 +72,14 @@ #define RULE_OP_MANGLE_DUPEBLOCK_LAST 'Y' #define RULE_OP_MANGLE_TITLE 'E' +#define RP_GEN 0 +#define RP_GEN_FUNC_MIN 1 +#define RP_GEN_FUNC_MAX 4 +#define RP_GEN_SEED 0 +#define RULE_BUF_L ":" +#define RULE_BUF_R ":" +#define INCR_RULES 10000 + typedef struct { uint len; diff --git a/include/status.h b/include/status.h index 78867cd9d..38c563a1e 100644 --- a/include/status.h +++ b/include/status.h @@ -9,8 +9,9 @@ #include #include -#define STATUS 0 -#define STATUS_TIMER 10 +#define STATUS 0 +#define STATUS_TIMER 10 +#define MACHINE_READABLE 0 typedef enum status_rc { diff --git a/include/terminal.h b/include/terminal.h index 91e3fcc1e..a0606a918 100644 --- a/include/terminal.h +++ b/include/terminal.h @@ -24,6 +24,8 @@ #include #endif // _WIN +#define QUIET 0 + #if defined (_WIN) void SetConsoleWindowSize (const int x); #endif diff --git a/include/usage.h b/include/usage.h index 4dc0d6526..50fa6ff0e 100644 --- a/include/usage.h +++ b/include/usage.h @@ -6,6 +6,8 @@ #ifndef _USAGE_H #define _USAGE_H +#define USAGE 0 + void usage_mini_print (const char *progname); void usage_big_print (const char *progname); diff --git a/include/wordlist.h b/include/wordlist.h index 043631ff4..f27f10bc1 100644 --- a/include/wordlist.h +++ b/include/wordlist.h @@ -6,6 +6,9 @@ #ifndef _WORDLIST_H #define _WORDLIST_H +#define HEX_WORDLIST 0 +#define SEGMENT_SIZE 32 + typedef struct { char *buf; diff --git a/src/hashcat.c b/src/hashcat.c index 8cf6d6faf..8b3aed6ca 100644 --- a/src/hashcat.c +++ b/src/hashcat.c @@ -82,129 +82,25 @@ extern hc_thread_mutex_t mux_display; extern void (*get_next_word_func) (char *, u32, u32 *, u32 *); +extern const char *PROMPT; + +extern const unsigned int full01; +extern const unsigned int full80; + static const char *PROGNAME = "hashcat"; static double TARGET_MS_PROFILE[4] = { 2, 12, 96, 480 }; const int comptime = COMPTIME; -#define INCR_RULES 10000 -#define INCR_SALTS 100000 -#define INCR_MASKS 1000 - -#define USAGE 0 -#define VERSION 0 -#define QUIET 0 -#define MARKOV_THRESHOLD 0 -#define MARKOV_DISABLE 0 -#define MARKOV_CLASSIC 0 -#define BENCHMARK 0 - -#define OUTFILE_CHECK_TIMER 5 -#define MACHINE_READABLE 0 -#define LOOPBACK 0 -#define WEAK_HASH_THRESHOLD 100 -#define SHOW 0 -#define LEFT 0 -#define USERNAME 0 -#define REMOVE 0 -#define REMOVE_TIMER 60 -#define SKIP 0 -#define LIMIT 0 -#define KEYSPACE 0 -#define DEBUG_MODE 0 -#define RP_GEN 0 -#define RP_GEN_FUNC_MIN 1 -#define RP_GEN_FUNC_MAX 4 -#define RP_GEN_SEED 0 -#define RULE_BUF_L ":" -#define RULE_BUF_R ":" #define FORCE 0 -#define RUNTIME 0 -#define HEX_CHARSET 0 -#define HEX_SALT 0 -#define HEX_WORDLIST 0 -#define ATTACK_MODE 0 -#define HASH_MODE 0 -#define SEGMENT_SIZE 32 -#define INCREMENT 0 -#define INCREMENT_MIN 1 -#define INCREMENT_MAX PW_MAX -#define SEPARATOR ':' -#define NVIDIA_SPIN_DAMP 100 -#define GPU_TEMP_DISABLE 0 -#define GPU_TEMP_ABORT 90 -#define GPU_TEMP_RETAIN 75 -#define WORKLOAD_PROFILE 2 -#define KERNEL_ACCEL 0 -#define KERNEL_LOOPS 0 -#define KERNEL_RULES 1024 -#define KERNEL_COMBS 1024 -#define KERNEL_BFS 1024 -#define KERNEL_THREADS_MAX 256 -#define KERNEL_THREADS_MAX_CPU 1 -#define POWERTUNE_ENABLE 0 -#define LOGFILE_DISABLE 0 -#define SCRYPT_TMTO 0 -#define OPENCL_VECTOR_WIDTH 0 - - - -static const char OPTI_STR_ZERO_BYTE[] = "Zero-Byte"; -static const char OPTI_STR_PRECOMPUTE_INIT[] = "Precompute-Init"; -static const char OPTI_STR_PRECOMPUTE_MERKLE[] = "Precompute-Merkle-Demgard"; -static const char OPTI_STR_PRECOMPUTE_PERMUT[] = "Precompute-Final-Permutation"; -static const char OPTI_STR_MEET_IN_MIDDLE[] = "Meet-In-The-Middle"; -static const char OPTI_STR_EARLY_SKIP[] = "Early-Skip"; -static const char OPTI_STR_NOT_SALTED[] = "Not-Salted"; -static const char OPTI_STR_NOT_ITERATED[] = "Not-Iterated"; -static const char OPTI_STR_PREPENDED_SALT[] = "Prepended-Salt"; -static const char OPTI_STR_APPENDED_SALT[] = "Appended-Salt"; -static const char OPTI_STR_SINGLE_HASH[] = "Single-Hash"; -static const char OPTI_STR_SINGLE_SALT[] = "Single-Salt"; -static const char OPTI_STR_BRUTE_FORCE[] = "Brute-Force"; -static const char OPTI_STR_RAW_HASH[] = "Raw-Hash"; -static const char OPTI_STR_SLOW_HASH_SIMD[] = "Slow-Hash-SIMD"; -static const char OPTI_STR_USES_BITS_8[] = "Uses-8-Bit"; -static const char OPTI_STR_USES_BITS_16[] = "Uses-16-Bit"; -static const char OPTI_STR_USES_BITS_32[] = "Uses-32-Bit"; -static const char OPTI_STR_USES_BITS_64[] = "Uses-64-Bit"; - - - -#if defined (_WIN) -#define mkdir(name,mode) mkdir (name) -#endif - - - - -#define INDUCT_DIR "induct" - - -#define LOOPBACK_FILE "hashcat.loopback" - - +// version +#define VERSION 0 +// benchmark +#define BENCHMARK 0 #define NUM_DEFAULT_BENCHMARK_ALGORITHMS 146 - -#define NVIDIA_100PERCENTCPU_WORKAROUND 100 - -#define global_free(attr) \ -{ \ - myfree ((void *) data.attr); \ - \ - data.attr = NULL; \ -} - -#define local_free(attr) \ -{ \ - myfree ((void *) attr); \ - \ - attr = NULL; \ -} - static uint default_benchmark_algorithms[NUM_DEFAULT_BENCHMARK_ALGORITHMS] = { 900, @@ -355,6 +251,113 @@ static uint default_benchmark_algorithms[NUM_DEFAULT_BENCHMARK_ALGORITHMS] = 125 }; +// outfile_check +#define OUTFILE_CHECK_TIMER 5 + +// loopback +#define LOOPBACK 0 +#define LOOPBACK_FILE "hashcat.loopback" + +// hashlist +#define WEAK_HASH_THRESHOLD 100 +#define USERNAME 0 + +// remove +#define REMOVE 0 +#define REMOVE_TIMER 60 + +// debug_mode +#define DEBUG_MODE 0 + +// runtime +#define RUNTIME 0 + +// attack_mode +#define ATTACK_MODE 0 + +// workaround +#define NVIDIA_SPIN_DAMP 100 + +// workload +#define WORKLOAD_PROFILE 2 +#define SCRYPT_TMTO 0 +#define KERNEL_ACCEL 0 +#define KERNEL_LOOPS 0 + +// kernel +#define KERNEL_RULES 1024 +#define KERNEL_COMBS 1024 +#define KERNEL_BFS 1024 +#define KERNEL_THREADS_MAX 256 +#define KERNEL_THREADS_MAX_CPU 1 +static const char OPTI_STR_ZERO_BYTE[] = "Zero-Byte"; +static const char OPTI_STR_PRECOMPUTE_INIT[] = "Precompute-Init"; +static const char OPTI_STR_PRECOMPUTE_MERKLE[] = "Precompute-Merkle-Demgard"; +static const char OPTI_STR_PRECOMPUTE_PERMUT[] = "Precompute-Final-Permutation"; +static const char OPTI_STR_MEET_IN_MIDDLE[] = "Meet-In-The-Middle"; +static const char OPTI_STR_EARLY_SKIP[] = "Early-Skip"; +static const char OPTI_STR_NOT_SALTED[] = "Not-Salted"; +static const char OPTI_STR_NOT_ITERATED[] = "Not-Iterated"; +static const char OPTI_STR_PREPENDED_SALT[] = "Prepended-Salt"; +static const char OPTI_STR_APPENDED_SALT[] = "Appended-Salt"; +static const char OPTI_STR_SINGLE_HASH[] = "Single-Hash"; +static const char OPTI_STR_SINGLE_SALT[] = "Single-Salt"; +static const char OPTI_STR_BRUTE_FORCE[] = "Brute-Force"; +static const char OPTI_STR_RAW_HASH[] = "Raw-Hash"; +static const char OPTI_STR_SLOW_HASH_SIMD[] = "Slow-Hash-SIMD"; +static const char OPTI_STR_USES_BITS_8[] = "Uses-8-Bit"; +static const char OPTI_STR_USES_BITS_16[] = "Uses-16-Bit"; +static const char OPTI_STR_USES_BITS_32[] = "Uses-32-Bit"; +static const char OPTI_STR_USES_BITS_64[] = "Uses-64-Bit"; + +// powertune +#define POWERTUNE_ENABLE 0 + +// autotune +#define OPENCL_VECTOR_WIDTH 0 + +// induct +#define INDUCT_DIR "induct" + +// + + + + + + +#if defined (_WIN) +#define mkdir(name,mode) mkdir (name) +#endif + + + + + + + + + + + + + +#define global_free(attr) \ +{ \ + myfree ((void *) data.attr); \ + \ + data.attr = NULL; \ +} + +#define local_free(attr) \ +{ \ + myfree ((void *) attr); \ + \ + attr = NULL; \ +} + + + /** * types */ @@ -365,8 +368,6 @@ static uint default_benchmark_algorithms[NUM_DEFAULT_BENCHMARK_ALGORITHMS] = * globals */ -static unsigned int full01 = 0x01010101; -static unsigned int full80 = 0x80808080; @@ -374,7 +375,7 @@ static hc_thread_mutex_t mux_counter; static hc_thread_mutex_t mux_dispatcher; -const char *PROMPT = "[s]tatus [p]ause [r]esume [b]ypass [c]heckpoint [q]uit => "; + /** * hashcat specific functions diff --git a/src/mpsp.c b/src/mpsp.c index c590790c4..766ac4b7b 100644 --- a/src/mpsp.c +++ b/src/mpsp.c @@ -36,6 +36,10 @@ extern hc_global_data_t data; +const unsigned int full01 = 0x01010101; +const unsigned int full80 = 0x80808080; + + void mp_css_to_uniq_tbl (uint css_cnt, cs_t *css, uint uniq_tbls[SP_PW_MAX][CHARSIZ]) { /* generates a lookup table where key is the char itself for fastest possible lookup performance */ diff --git a/src/terminal.c b/src/terminal.c index 9b1b2dbd2..7456840c2 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -6,6 +6,8 @@ #include "common.h" #include "terminal.h" +const char *PROMPT = "[s]tatus [p]ause [r]esume [b]ypass [c]heckpoint [q]uit => "; + #if defined (_WIN) void SetConsoleWindowSize (const int x) {