1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-23 07:08:19 +00:00

replaced macros with enums and static const char types

also had to move COMBINATOR_MODE defenition from inc_hash_constants.h to inc_types.cl to avoid conflicts
based on d57d9245db
This commit is contained in:
jsteube 2016-09-05 13:52:47 +02:00
parent d54b399561
commit 2216920866
3 changed files with 79 additions and 46 deletions

View File

@ -3,9 +3,6 @@
* License.....: MIT
*/
#define COMBINATOR_MODE_BASE_LEFT 10001
#define COMBINATOR_MODE_BASE_RIGHT 10002
#ifdef SHARED_H
#define _AXCRYPT_
#define _BCRYPT_

View File

@ -1375,3 +1375,10 @@ typedef struct
uint4 P[SCRYPT_TMP_ELEM];
} scrypt_tmp_t;
typedef enum combinator_mode
{
COMBINATOR_MODE_BASE_LEFT = 10001,
COMBINATOR_MODE_BASE_RIGHT = 10002
} combinator_mode_t;

View File

@ -97,56 +97,85 @@ static double TARGET_MS_PROFILE[4] = { 2, 12, 96, 480 };
#define SCRYPT_TMTO 0
#define OPENCL_VECTOR_WIDTH 0
#define WL_MODE_STDIN 1
#define WL_MODE_FILE 2
#define WL_MODE_MASK 3
typedef enum wl_mode
{
WL_MODE_STDIN = 1,
WL_MODE_FILE = 2,
WL_MODE_MASK = 3
#define HL_MODE_FILE 4
#define HL_MODE_ARG 5
} wl_mode_t;
#define HLFMTS_CNT 11
#define HLFMT_HASHCAT 0
#define HLFMT_PWDUMP 1
#define HLFMT_PASSWD 2
#define HLFMT_SHADOW 3
#define HLFMT_DCC 4
#define HLFMT_DCC2 5
#define HLFMT_NETNTLM1 7
#define HLFMT_NETNTLM2 8
#define HLFMT_NSLDAP 9
#define HLFMT_NSLDAPS 10
typedef enum hl_mode
{
HL_MODE_FILE = 4,
HL_MODE_ARG = 5
#define HLFMT_TEXT_HASHCAT "native hashcat"
#define HLFMT_TEXT_PWDUMP "pwdump"
#define HLFMT_TEXT_PASSWD "passwd"
#define HLFMT_TEXT_SHADOW "shadow"
#define HLFMT_TEXT_DCC "DCC"
#define HLFMT_TEXT_DCC2 "DCC 2"
#define HLFMT_TEXT_NETNTLM1 "NetNTLMv1"
#define HLFMT_TEXT_NETNTLM2 "NetNTLMv2"
#define HLFMT_TEXT_NSLDAP "nsldap"
#define HLFMT_TEXT_NSLDAPS "nsldaps"
} hl_mode_t;
#define ATTACK_MODE_STRAIGHT 0
#define ATTACK_MODE_COMBI 1
#define ATTACK_MODE_TOGGLE 2
#define ATTACK_MODE_BF 3
#define ATTACK_MODE_PERM 4
#define ATTACK_MODE_TABLE 5
#define ATTACK_MODE_HYBRID1 6
#define ATTACK_MODE_HYBRID2 7
#define ATTACK_MODE_NONE 100
#define HLFMTS_CNT 11
#define ATTACK_KERN_STRAIGHT 0
#define ATTACK_KERN_COMBI 1
#define ATTACK_KERN_BF 3
#define ATTACK_KERN_NONE 100
typedef enum hlfmt_name
{
HLFMT_HASHCAT = 0,
HLFMT_PWDUMP = 1,
HLFMT_PASSWD = 2,
HLFMT_SHADOW = 3,
HLFMT_DCC = 4,
HLFMT_DCC2 = 5,
HLFMT_NETNTLM1 = 7,
HLFMT_NETNTLM2 = 8,
HLFMT_NSLDAP = 9,
HLFMT_NSLDAPS = 10
#define ATTACK_EXEC_OUTSIDE_KERNEL 10
#define ATTACK_EXEC_INSIDE_KERNEL 11
} hlfmt_name_t;
#define COMBINATOR_MODE_BASE_LEFT 10001
#define COMBINATOR_MODE_BASE_RIGHT 10002
static const char HLFMT_TEXT_HASHCAT[] = "native hashcat";
static const char HLFMT_TEXT_PWDUMP[] = "pwdump";
static const char HLFMT_TEXT_PASSWD[] = "passwd";
static const char HLFMT_TEXT_SHADOW[] = "shadow";
static const char HLFMT_TEXT_DCC[] = "DCC";
static const char HLFMT_TEXT_DCC2[] = "DCC 2";
static const char HLFMT_TEXT_NETNTLM1[] = "NetNTLMv1";
static const char HLFMT_TEXT_NETNTLM2[] = "NetNTLMv2";
static const char HLFMT_TEXT_NSLDAP[] = "nsldap";
static const char HLFMT_TEXT_NSLDAPS[] = "nsldaps";
typedef enum attack_mode
{
ATTACK_MODE_STRAIGHT = 0,
ATTACK_MODE_COMBI = 1,
ATTACK_MODE_TOGGLE = 2,
ATTACK_MODE_BF = 3,
ATTACK_MODE_PERM = 4,
ATTACK_MODE_TABLE = 5,
ATTACK_MODE_HYBRID1 = 6,
ATTACK_MODE_HYBRID2 = 7,
ATTACK_MODE_NONE = 100
} attack_mode_t;
typedef enum attack_kern
{
ATTACK_KERN_STRAIGHT = 0,
ATTACK_KERN_COMBI = 1,
ATTACK_KERN_BF = 3,
ATTACK_KERN_NONE = 100
} attack_kern_t;
typedef enum attack_exec
{
ATTACK_EXEC_OUTSIDE_KERNEL = 10,
ATTACK_EXEC_INSIDE_KERNEL = 11
} attack_exec_t;
typedef enum combinator_mode
{
COMBINATOR_MODE_BASE_LEFT = 10001,
COMBINATOR_MODE_BASE_RIGHT = 10002
} combinator_mode_t;
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#define MAX(a,b) (((a) > (b)) ? (a) : (b))