1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-01-08 23:01:14 +00:00

Reduce max. number of allowed function calls per rule from 256 to 32 to save GPU memory

This commit is contained in:
jsteube 2016-09-22 22:54:20 +02:00
parent 319d548766
commit d3d9b4e679
4 changed files with 6 additions and 5 deletions

View File

@ -1318,7 +1318,7 @@ typedef struct
typedef struct typedef struct
{ {
u32 cmds[0x100]; u32 cmds[32];
} kernel_rule_t; } kernel_rule_t;

View File

@ -11,6 +11,7 @@
- Added docs/credits.txt - Added docs/credits.txt
- Added docs/team.txt - Added docs/team.txt
- Allow words of length > 32 in wordlists for -a 0 for slow hashes if no rules are in use or a : rule is in the rulefile - Allow words of length > 32 in wordlists for -a 0 for slow hashes if no rules are in use or a : rule is in the rulefile
- Reduce max. number of allowed function calls per rule from 256 to 32 to save GPU memory
## ##
## Algorithms ## Algorithms

View File

@ -680,13 +680,13 @@ typedef struct
{ {
u32 len; u32 len;
char buf[0x100]; char buf[32];
} cpu_rule_t; } cpu_rule_t;
typedef struct typedef struct
{ {
u32 cmds[0x100]; u32 cmds[32];
} kernel_rule_t; } kernel_rule_t;
@ -1034,7 +1034,7 @@ typedef struct
} hc_global_data_t; } hc_global_data_t;
#define RULES_MAX 256 #define RULES_MAX 32
#define PW_DICTMAX 31 #define PW_DICTMAX 31
#define PW_DICTMAX1 (PW_DICTMAX + 1) #define PW_DICTMAX1 (PW_DICTMAX + 1)

View File

@ -172,7 +172,7 @@ static int conv_itoc (const u8 c)
#define SET_NAME(rule,val) (rule)->cmds[rule_cnt] = ((val) & 0xff) << 0 #define SET_NAME(rule,val) (rule)->cmds[rule_cnt] = ((val) & 0xff) << 0
#define SET_P0(rule,val) INCR_POS; (rule)->cmds[rule_cnt] |= ((val) & 0xff) << 8 #define SET_P0(rule,val) INCR_POS; (rule)->cmds[rule_cnt] |= ((val) & 0xff) << 8
#define SET_P1(rule,val) INCR_POS; (rule)->cmds[rule_cnt] |= ((val) & 0xff) << 16 #define SET_P1(rule,val) INCR_POS; (rule)->cmds[rule_cnt] |= ((val) & 0xff) << 16
#define MAX_KERNEL_RULES 255 #define MAX_KERNEL_RULES 31
#define GET_NAME(rule) rule_cmd = (((rule)->cmds[rule_cnt] >> 0) & 0xff) #define GET_NAME(rule) rule_cmd = (((rule)->cmds[rule_cnt] >> 0) & 0xff)
#define GET_P0(rule) INCR_POS; rule_buf[rule_pos] = (((rule)->cmds[rule_cnt] >> 8) & 0xff) #define GET_P0(rule) INCR_POS; rule_buf[rule_pos] = (((rule)->cmds[rule_cnt] >> 8) & 0xff)
#define GET_P1(rule) INCR_POS; rule_buf[rule_pos] = (((rule)->cmds[rule_cnt] >> 16) & 0xff) #define GET_P1(rule) INCR_POS; rule_buf[rule_pos] = (((rule)->cmds[rule_cnt] >> 16) & 0xff)