hashcat Forum
Rules: Order of Operation - Printable Version

+- hashcat Forum (https://hashcat.net/forum)
+-- Forum: Support (https://hashcat.net/forum/forum-3.html)
+--- Forum: hashcat (https://hashcat.net/forum/forum-45.html)
+--- Thread: Rules: Order of Operation (/thread-5625.html)



Rules: Order of Operation - princey - 07-10-2016

Hi All,

I have not been able to find solid documentation on the order of operation for rules.

For example:

password + rule: $1$2$3 = password123, implying that the append is evaluated left to right.

Suppose the following statement hypothetical proof of concept rule...

l $9$9 ss5 s98 c

Does this also evaluate left to right resulting in the following?

l $9$9 ss5 s98 c + PASSWORD = Pa55word88

1. PASSWORD + l -> password
2. + $9$9 -> password99
3. + ss5 -> pa55word99
4. + s98 -> pa55word88
5. + c -> Pa55word88

Any light you could shed on this would be incredibly helpful. Many thanks.


RE: Rules: Order of Operation - hops - 07-10-2016

Yes rules are processed from left to right.
If you are unsure or want to test your rules use the --stdout option.

Code:
$ cat rule
l $9$9 ss5 s98 c
$ cat word
PASSWORD
$ ./hashcat64.bin --stdout -r rule word
Pa55word88



RE: Rules: Order of Operation - princey - 07-10-2016

(07-10-2016, 10:13 AM)hops Wrote: Yes rules are processed from left to right.
If you are unsure or want to test your rules use the --stdout option.

Code:
$ cat rule
l $9$9 ss5 s98 c
$ cat word
PASSWORD
$ ./hashcat64.bin --stdout -r rule word
Pa55word88

Thanks so much, hops. This is a really useful command as I evaluate rules moving forward. Much appreciated.


RE: Rules: Order of Operation - rico - 07-10-2016

Don't forget the debugging options you can use to output successful rules (and optionally the original and processed words too):

Code:
    --debug-mode              | Num  | Defines the debug mode (hybrid only by using rules)  | --debug-mode=4
    --debug-file              | File | Output file for debugging rules                      | --debug-file=good.log

- [ Rule Debugging Modes ] -

  # | Format
 ===+========
  1 | Finding-Rule
  2 | Original-Word
  3 | Original-Word:Finding-Rule
  4 | Original-Word:Finding-Rule:Processed-Word