Skip to content

Commit

Permalink
rules: added eC and e?C which are extended title case rule
Browse files Browse the repository at this point in the history
  • Loading branch information
jfoug committed Apr 17, 2016
1 parent dd534ce commit 76208e2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
4 changes: 4 additions & 0 deletions doc/RULES
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,10 @@ s?CY replace all characters of class C in the word with Y
%NX reject the word unless it contains at least N instances of X
%N?C reject the word unless it contains at least N characters of class C
U reject the word unless it is valid UTF-8 (use with -u rule reject)
eC title case, where C is the separation character
e?C title case, with chars from class C as separation characters.
NOTE, see hashcat specific 'E' rule which is generic title case for space
only characters. The 'e' rule extendeded more powerful version.

Note that U will accept plain ASCII. It will only reject words that contain
8-bit characters but can't be parsed as UTF-8. It can be used to reject
Expand Down
15 changes: 7 additions & 8 deletions src/rules.c
Original file line number Diff line number Diff line change
Expand Up @@ -2232,17 +2232,16 @@ char *rules_apply(char *word_in, char *rule, int split, char *last)
}
break;

/*case 'e':
case 'e': /* extended title case JtR specific, not HC 'yet' */
{
/ *
* todo. Was thinking an 'extended' version of
* the E command. Something that would also
* case after symbols, etc. So something like
* my-login-account -> My-Login-Account
* /
int up=1;
CLASS(0,
up=1,
if(up) in[pos] = conv_toupper[ARCH_INDEX(in[pos])];
else in[pos] = conv_tolower[ARCH_INDEX(in[pos])];
up=0)
}
break;
*/

default:
goto out_ERROR_UNKNOWN;
Expand Down

0 comments on commit 76208e2

Please sign in to comment.