1
mirror of https://github.com/hashcat/hashcat synced 2024-12-27 05:13:45 +01:00

Add template files

This commit is contained in:
jsteube 2016-09-11 11:42:19 +02:00
parent fe634d93aa
commit 2a6e03510b
35 changed files with 277 additions and 20 deletions

9
include/attack_mode.h Normal file
View File

@ -0,0 +1,9 @@
/**
* Authors.....: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#ifndef _ATTACK_MODE_H
#define _ATTACK_MODE_H
#endif // _ATTACK_MODE_H

9
include/autotune.h Normal file
View File

@ -0,0 +1,9 @@
/**
* Authors.....: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#ifndef _AUTOTUNE_H
#define _AUTOTUNE_H
#endif // _AUTOTUNE_H

9
include/benchmark.h Normal file
View File

@ -0,0 +1,9 @@
/**
* Authors.....: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#ifndef _BENCHMARK_H
#define _BENCHMARK_H
#endif // _BENCHMARK_H

9
include/debugfile.h Normal file
View File

@ -0,0 +1,9 @@
/**
* Authors.....: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#ifndef _DEBUGFILE_H
#define _DEBUGFILE_H
#endif // _DEBUGFILE_H

View File

@ -0,0 +1,9 @@
/**
* Authors.....: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#ifndef _HASH_MANAGEMENT_H
#define _HASH_MANAGEMENT_H
#endif // _HASH_MANAGEMENT_H

9
include/induct.h Normal file
View File

@ -0,0 +1,9 @@
/**
* Authors.....: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#ifndef _INDUCT_H
#define _INDUCT_H
#endif // _INDUCT_H

9
include/kernel.h Normal file
View File

@ -0,0 +1,9 @@
/**
* Authors.....: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#ifndef _KERNEL_H
#define _KERNEL_H
#endif // _KERNEL_H

9
include/loopback.h Normal file
View File

@ -0,0 +1,9 @@
/**
* Authors.....: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#ifndef _LOOPBACK_H
#define _LOOPBACK_H
#endif // _LOOPBACK_H

9
include/outfile_check.h Normal file
View File

@ -0,0 +1,9 @@
/**
* Authors.....: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#ifndef _OUTFILE_CHECK_H
#define _OUTFILE_CHECK_H
#endif // _OUTFILE_CHECK_H

9
include/powertune.h Normal file
View File

@ -0,0 +1,9 @@
/**
* Authors.....: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#ifndef _POWERTUNE_H
#define _POWERTUNE_H
#endif // _POWERTUNE_H

9
include/remove.h Normal file
View File

@ -0,0 +1,9 @@
/**
* Authors.....: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#ifndef _REMOVE_H
#define _REMOVE_H
#endif // _REMOVE_H

9
include/runtime.h Normal file
View File

@ -0,0 +1,9 @@
/**
* Authors.....: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#ifndef _RUNTIME_H
#define _RUNTIME_H
#endif // _RUNTIME_H

View File

@ -8,7 +8,10 @@
#if defined (_POSIX)
#include <sys/time.h>
#else
#endif
#if defined (_WIN)
#include <windows.h>
#endif
#if defined (_WIN)

9
include/version.h Normal file
View File

@ -0,0 +1,9 @@
/**
* Authors.....: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#ifndef _VERSION_H
#define _VERSION_H
#endif // _VERSION_H

9
include/weak_hash.h Normal file
View File

@ -0,0 +1,9 @@
/**
* Authors.....: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#ifndef _WEAK_HASH_H
#define _WEAK_HASH_H
#endif // _WEAK_HASH_H

View File

@ -166,17 +166,12 @@ LFLAGS_CROSS_WIN := -lpsapi
## Objects
##
NATIVE_OBJS := obj/outfile.NATIVE.o obj/potfile.NATIVE.o obj/dictstat.NATIVE.o obj/wordlist.NATIVE.o obj/stdout.NATIVE.o obj/filenames.NATIVE.o obj/hlfmt.NATIVE.o obj/status.NATIVE.o obj/restore.NATIVE.o obj/bitmap.NATIVE.o obj/opencl.NATIVE.o obj/affinity.NATIVE.o obj/filehandling.NATIVE.o obj/tuningdb.NATIVE.o obj/locking.NATIVE.o obj/folder.NATIVE.o obj/bitops.NATIVE.o obj/convert.NATIVE.o obj/cpu_aes.NATIVE.o obj/cpu_crc32.NATIVE.o obj/cpu_des.NATIVE.o obj/cpu_md5.NATIVE.o obj/cpu_sha1.NATIVE.o obj/cpu_sha256.NATIVE.o obj/data.NATIVE.o obj/ext_OpenCL.NATIVE.o obj/hwmon.NATIVE.o obj/interface.NATIVE.o obj/logfile.NATIVE.o obj/logging.NATIVE.o obj/memory.NATIVE.o obj/mpsp.NATIVE.o obj/rp_cpu.NATIVE.o obj/rp_kernel_on_cpu.NATIVE.o obj/shared.NATIVE.o obj/terminal.NATIVE.o obj/usage.NATIVE.o
OBJS_ALL := affinity attack_mode autotune benchmark bitmap bitops common convert cpu_aes cpu_crc32 cpu_des cpu_md5 cpu_sha1 cpu_sha256 data debugfile dictstat dynloader ext_ADL ext_nvapi ext_nvml ext_OpenCL ext_xnvctrl filehandling filenames folder hash_management hlfmt hwmon induct interface kernel locking logfile logging loopback memory mpsp opencl outfile_check outfile potfile powertune remove restore rp_cpu rp_kernel_on_cpu runtime shared status stdout terminal thread timer tuningdb usage version weak_hash wordlist
ifeq ($(UNAME),Linux)
NATIVE_OBJS += obj/ext_ADL.NATIVE.o
NATIVE_OBJS += obj/ext_nvapi.NATIVE.o
NATIVE_OBJS += obj/ext_nvml.NATIVE.o
NATIVE_OBJS += obj/ext_xnvctrl.NATIVE.o
endif
NATIVE_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).NATIVE.o)
LINUX_32_OBJS := obj/outfile.LINUX.32.o obj/potfile.LINUX.32.o obj/dictstat.LINUX.32.o obj/wordlist.LINUX.32.o obj/stdout.LINUX.32.o obj/filenames.LINUX.32.o obj/hlfmt.LINUX.32.o obj/status.LINUX.32.o obj/restore.LINUX.32.o obj/bitmap.LINUX.32.o obj/opencl.LINUX.32.o obj/affinity.LINUX.32.o obj/filehandling.LINUX.32.o obj/tuningdb.LINUX.32.o obj/locking.LINUX.32.o obj/folder.LINUX.32.o obj/bitops.LINUX.32.o obj/convert.LINUX.32.o obj/cpu_aes.LINUX.32.o obj/cpu_crc32.LINUX.32.o obj/cpu_des.LINUX.32.o obj/cpu_md5.LINUX.32.o obj/cpu_sha1.LINUX.32.o obj/cpu_sha256.LINUX.32.o obj/data.LINUX.32.o obj/ext_ADL.LINUX.32.o obj/ext_nvapi.LINUX.32.o obj/ext_nvml.LINUX.32.o obj/ext_OpenCL.LINUX.32.o obj/ext_xnvctrl.LINUX.32.o obj/hwmon.LINUX.32.o obj/interface.LINUX.32.o obj/logfile.LINUX.32.o obj/logging.LINUX.32.o obj/memory.LINUX.32.o obj/mpsp.LINUX.32.o obj/rp_cpu.LINUX.32.o obj/rp_kernel_on_cpu.LINUX.32.o obj/shared.LINUX.32.o obj/terminal.LINUX.32.o obj/usage.LINUX.32.o
LINUX_64_OBJS := obj/outfile.LINUX.64.o obj/potfile.LINUX.64.o obj/dictstat.LINUX.64.o obj/wordlist.LINUX.64.o obj/stdout.LINUX.64.o obj/filenames.LINUX.64.o obj/hlfmt.LINUX.64.o obj/status.LINUX.64.o obj/restore.LINUX.64.o obj/bitmap.LINUX.64.o obj/opencl.LINUX.64.o obj/affinity.LINUX.64.o obj/filehandling.LINUX.64.o obj/tuningdb.LINUX.64.o obj/locking.LINUX.64.o obj/folder.LINUX.64.o obj/bitops.LINUX.64.o obj/convert.LINUX.64.o obj/cpu_aes.LINUX.64.o obj/cpu_crc32.LINUX.64.o obj/cpu_des.LINUX.64.o obj/cpu_md5.LINUX.64.o obj/cpu_sha1.LINUX.64.o obj/cpu_sha256.LINUX.64.o obj/data.LINUX.64.o obj/ext_ADL.LINUX.64.o obj/ext_nvapi.LINUX.64.o obj/ext_nvml.LINUX.64.o obj/ext_OpenCL.LINUX.64.o obj/ext_xnvctrl.LINUX.64.o obj/hwmon.LINUX.64.o obj/interface.LINUX.64.o obj/logfile.LINUX.64.o obj/logging.LINUX.64.o obj/memory.LINUX.64.o obj/mpsp.LINUX.64.o obj/rp_cpu.LINUX.64.o obj/rp_kernel_on_cpu.LINUX.64.o obj/shared.LINUX.64.o obj/terminal.LINUX.64.o obj/usage.LINUX.64.o
LINUX_32_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).LINUX.32.o)
LINUX_64_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).LINUX.64.o)
# Windows CRT file globbing:
@ -186,8 +181,8 @@ CRT_GLOB_INCLUDE_FOLDER := $(dir $(lastword $(MAKEFILE_LIST)))
include $(CRT_GLOB_INCLUDE_FOLDER)/win_file_globbing.mk
WIN_32_OBJS := obj/outfile.WIN.32.o obj/potfile.WIN.32.o obj/dictstat.WIN.32.o obj/wordlist.WIN.32.o obj/stdout.WIN.32.o obj/filenames.WIN.32.o obj/hlfmt.WIN.32.o obj/status.WIN.32.o obj/restore.WIN.32.o obj/bitmap.WIN.32.o obj/opencl.WIN.32.o obj/affinity.WIN.32.o obj/filehandling.WIN.32.o obj/tuningdb.WIN.32.o obj/locking.WIN.32.o obj/folder.WIN.32.o obj/bitops.WIN.32.o obj/convert.WIN.32.o obj/cpu_aes.WIN.32.o obj/cpu_crc32.WIN.32.o obj/cpu_des.WIN.32.o obj/cpu_md5.WIN.32.o obj/cpu_sha1.WIN.32.o obj/cpu_sha256.WIN.32.o obj/data.WIN.32.o obj/ext_ADL.WIN.32.o obj/ext_nvapi.WIN.32.o obj/ext_nvml.WIN.32.o obj/ext_OpenCL.WIN.32.o obj/ext_xnvctrl.WIN.32.o obj/hwmon.WIN.32.o obj/interface.WIN.32.o obj/logfile.WIN.32.o obj/logging.WIN.32.o obj/memory.WIN.32.o obj/mpsp.WIN.32.o obj/rp_cpu.WIN.32.o obj/rp_kernel_on_cpu.WIN.32.o obj/shared.WIN.32.o obj/terminal.WIN.32.o obj/usage.WIN.32.o $(CRT_GLOB_32)
WIN_64_OBJS := obj/outfile.WIN.64.o obj/potfile.WIN.64.o obj/dictstat.WIN.64.o obj/wordlist.WIN.64.o obj/stdout.WIN.64.o obj/filenames.WIN.64.o obj/hlfmt.WIN.64.o obj/status.WIN.64.o obj/restore.WIN.64.o obj/bitmap.WIN.64.o obj/opencl.WIN.64.o obj/affinity.WIN.64.o obj/filehandling.WIN.64.o obj/tuningdb.WIN.64.o obj/locking.WIN.64.o obj/folder.WIN.64.o obj/bitops.WIN.64.o obj/convert.WIN.64.o obj/cpu_aes.WIN.64.o obj/cpu_crc32.WIN.64.o obj/cpu_des.WIN.64.o obj/cpu_md5.WIN.64.o obj/cpu_sha1.WIN.64.o obj/cpu_sha256.WIN.64.o obj/data.WIN.64.o obj/ext_ADL.WIN.64.o obj/ext_nvapi.WIN.64.o obj/ext_nvml.WIN.64.o obj/ext_OpenCL.WIN.64.o obj/ext_xnvctrl.WIN.64.o obj/hwmon.WIN.64.o obj/interface.WIN.64.o obj/logfile.WIN.64.o obj/logging.WIN.64.o obj/memory.WIN.64.o obj/mpsp.WIN.64.o obj/rp_cpu.WIN.64.o obj/rp_kernel_on_cpu.WIN.64.o obj/shared.WIN.64.o obj/terminal.WIN.64.o obj/usage.WIN.64.o $(CRT_GLOB_64)
WIN_32_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).WIN.32.o)
WIN_64_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).WIN.64.o)
##
## Targets: Global

7
src/attack_mode.c Normal file
View File

@ -0,0 +1,7 @@
/**
* Author......: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#include "common.h"
#include "attack_mode.h"

7
src/autotune.c Normal file
View File

@ -0,0 +1,7 @@
/**
* Author......: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#include "common.h"
#include "autotune.h"

7
src/benchmark.c Normal file
View File

@ -0,0 +1,7 @@
/**
* Author......: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#include "common.h"
#include "benchmark.h"

6
src/common.c Normal file
View File

@ -0,0 +1,6 @@
/**
* Author......: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#include "common.h"

7
src/debugfile.c Normal file
View File

@ -0,0 +1,7 @@
/**
* Author......: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#include "common.h"
#include "debugfile.h"

7
src/dynloader.c Normal file
View File

@ -0,0 +1,7 @@
/**
* Author......: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#include "common.h"
#include "dynloader.h"

7
src/hash_management.c Normal file
View File

@ -0,0 +1,7 @@
/**
* Author......: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#include "common.h"
#include "hash_management.h"

View File

@ -72,6 +72,20 @@
#include "stdout.h"
#include "wordlist.h"
#include "dictstat.h"
#include "version.h"
#include "benchmark.h"
#include "outfile_check.h"
#include "loopback.h"
#include "weak_hash.h"
#include "hash_management.h"
#include "remove.h"
#include "debugfile.h"
#include "runtime.h"
#include "attack_mode.h"
#include "kernel.h"
#include "powertune.h"
#include "autotune.h"
#include "induct.h"
extern hc_global_data_t data;
@ -296,10 +310,10 @@ void loopback_format_plain (loopback_ctx_t *loopback_ctx, const unsigned char *p
}
}
// weak hash
// weak_hash
#define WEAK_HASH_THRESHOLD 100
// hashes
// hash_management
#define USERNAME 0
int sort_by_digest_p0p1 (const void *v1, const void *v2)
{
@ -322,7 +336,6 @@ int sort_by_digest_p0p1 (const void *v1, const void *v2)
return 0;
}
int sort_by_salt (const void *v1, const void *v2)
{
const salt_t *s1 = (const salt_t *) v1;
@ -388,7 +401,6 @@ int sort_by_hash_no_salt (const void *v1, const void *v2)
}
// remove
#define REMOVE 0
#define REMOVE_TIMER 60
@ -400,8 +412,6 @@ typedef struct
FILE *fp;
} debug_ctx_t;
void debug_format_plain (debug_ctx_t *debug_ctx, const unsigned char *plain_ptr, const uint plain_len)
{
int needs_hexify = 0;
@ -439,8 +449,6 @@ void debug_format_plain (debug_ctx_t *debug_ctx, const unsigned char *plain_ptr,
fwrite (plain_ptr, plain_len, 1, debug_ctx->fp);
}
}
void format_debug (char *debug_file, uint debug_mode, unsigned char *orig_plain_ptr, uint orig_plain_len, unsigned char *mod_plain_ptr, uint mod_plain_len, char *rule_buf, int rule_len)
{
unsigned char *rule_ptr = (unsigned char *) rule_buf;

7
src/induct.c Normal file
View File

@ -0,0 +1,7 @@
/**
* Author......: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#include "common.h"
#include "induct.h"

7
src/kernel.c Normal file
View File

@ -0,0 +1,7 @@
/**
* Author......: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#include "common.h"
#include "kernel.h"

7
src/loopback.c Normal file
View File

@ -0,0 +1,7 @@
/**
* Author......: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#include "common.h"
#include "loopback.h"

7
src/outfile_check.c Normal file
View File

@ -0,0 +1,7 @@
/**
* Author......: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#include "common.h"
#include "outfile_check.h"

7
src/powertune.c Normal file
View File

@ -0,0 +1,7 @@
/**
* Author......: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#include "common.h"
#include "powertune.h"

7
src/remove.c Normal file
View File

@ -0,0 +1,7 @@
/**
* Author......: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#include "common.h"
#include "remove.h"

7
src/runtime.c Normal file
View File

@ -0,0 +1,7 @@
/**
* Author......: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#include "common.h"
#include "runtime.h"

7
src/thread.c Normal file
View File

@ -0,0 +1,7 @@
/**
* Author......: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#include "common.h"
#include "thread.h"

7
src/timer.c Normal file
View File

@ -0,0 +1,7 @@
/**
* Author......: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#include "common.h"
#include "timer.h"

7
src/version.c Normal file
View File

@ -0,0 +1,7 @@
/**
* Author......: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#include "common.h"
#include "version.h"

7
src/weak_hash.c Normal file
View File

@ -0,0 +1,7 @@
/**
* Author......: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#include "common.h"
#include "weak_hash.h"