hashcat / princeprocessor

Standalone password candidate generator using the PRINCE algorithm
Other
425 stars 98 forks source link

add rule support #44

Closed ryabkov closed 8 years ago

ryabkov commented 9 years ago

May be add support for simple rules (something like upper and lower case) to this tool ? In such case we can use smaller dictionary to generate something like: Super1password, super1password, SUPER1password, SUPER1PASSWORD

I think it will be more efficient than have different words (Super,SUPER,super...) in dictionary....

jsteube commented 9 years ago

Why would it be more efficient?

ryabkov commented 9 years ago

Correct me .... but

  1. I think that you load all dictionary in memory ... So if dictionary is big it can not be fit in memory... so we must use swap...
  2. smaller dictionary can be process more efficient (while you prepaire - sort with keyspace )
  3. smaller dictionary (must check) can be generated more efficient because of cache prefetch
magnumripper commented 9 years ago

You mean case-mangling on the fly instead of adding each combination to the (in memory) wordlist? That makes some sense, but the code will be tricky (eg. resuming) and slow.

ryabkov commented 9 years ago

Why do you think that code will be slow?...I think for big dictionary this will be more effecient...(see prev comments)

magnumripper commented 9 years ago

Because you'd have to put it in the inner loop. Any extra code there impacts performance.

jsteube commented 8 years ago

The problem with an inner loop would be that it will change the keyspace, and therefore we would also need some changes to --skip and --limit. I don't see a real advantage here in comparison to using a mangled wordlist created by some external tool, eg: hashcat in --stdout mode.

magnumripper commented 8 years ago

Just for the record: In JtR Jumbo, the built-in prince mode (which is the very same code as here, but with some bits and pieces added) does support rules. At best I think we manage to do 25% of the original speed...

But in case of princeprocessor, you always pipe it to something - I think it'd make more sense to apply rules in the 'next step' in that pipe.

ryabkov commented 8 years ago

to magnumripper

But in case of princeprocessor, you always pipe it to something - I think it'd make more sense to >>apply rules in the 'next step' in that pipe. you dont understand .. in your case you apply rule after prince its not a problem (hascat can do that)... But in my case rules must be applied before prince...

example you have 2 words - "password" and "super" and i want generate "PasswordSuper"

to jsteube

ok...

magnumripper commented 8 years ago

Your example is already implemented (the --case-permute option) but I reckon you mean a more advanced/flexible version of it. Sure, it makes sense. You could add rules before piping words to pp though.