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

Allow device name substrings in hashcat.hctune

This commit is contained in:
jsteube 2017-10-27 01:01:07 +02:00
parent 00abb849e1
commit 966cff80bc
2 changed files with 15 additions and 3 deletions

View File

@ -219,10 +219,11 @@ GeForce_GTX_960M ALIAS_nv_sm50
Tesla_M40 ALIAS_nv_sm52_or_higher
Tesla_V100 ALIAS_nv_sm52_or_higher
Quadro_M2000 ALIAS_nv_sm52_or_higher
Quadro_M4000 ALIAS_nv_sm52_or_higher
Quadro_M5000 ALIAS_nv_sm52_or_higher
Quadro_M6000_24GB ALIAS_nv_sm52_or_higher
Quadro_M6000 ALIAS_nv_sm52_or_higher
GeForce_GTX_950 ALIAS_nv_sm52_or_higher

View File

@ -340,9 +340,20 @@ tuning_db_entry_t *tuning_db_search (hashcat_ctx_t *hashcat_ctx, const char *dev
a.device_name = device_name_nospace;
tuning_db_alias_t *alias = bsearch (&a, tuning_db->alias_buf, tuning_db->alias_cnt, sizeof (tuning_db_alias_t), sort_by_tuning_db_alias);
char *alias_name = NULL;
char *alias_name = (alias == NULL) ? NULL : alias->alias_name;
for (int i = device_name_length - 1; i >= 1; i--)
{
device_name_nospace[i] = 0;
tuning_db_alias_t *alias = bsearch (&a, tuning_db->alias_buf, tuning_db->alias_cnt, sizeof (tuning_db_alias_t), sort_by_tuning_db_alias);
if (alias == NULL) continue;
alias_name = alias->alias_name;
break;
}
// attack-mode 6 and 7 are attack-mode 1 basically