Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140322211314.GA20042@openwall.com>
Date: Sun, 23 Mar 2014 01:13:14 +0400
From: Aleksey Cherepanov <lyosha@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: proof of concept converter of rexgen-like syntax into john rules

I heard about possibility to pull rexgen into john. I know nothing
about rexgen but I saw some examples.

I think rexgen-like syntax could be a part of rules and performed at
preprocessor level like []. For instance
-s x** rexgen"\0o(n|ff)" }
would be translated into
-s x** Az"on" }
-s x** Az"off" }
I do not propose exactly rexgen"..." as the syntax.

I saw some examples and I wrote simple script to implement the syntax.
It does not seem very hard.

The script converts rexgen-like expression into john's rules. It does
not support '(' inside [], there is no way to escape '(', '|' and ')'.
But it correctly expands groups and it could handle multiple \0. It
lacks correct user interface.

I used M and X0zz rules to support multiple \0 so generated rules
change memorized value. It would be a problem combining it with other
rules.

I expand groups, then I expand \0 into rules. Though I have a problem
with
$rule = "b(\\|a)(0|1)e";
Because first branches together give me \0 that was not on input. It
should not be hard to implement it right.

Implementation at the preprocessor level could have drawbacks. I do
not know them.

I will not continue the work but if you have questions about the
script I will answer them.

Thanks!

-- 
Regards,
Aleksey Cherepanov

View attachment "rexgen.pl" of type "text/x-perl" (2343 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.