Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 14 Apr 2014 20:42:04 +0400
From: Aleksey Cherepanov <lyosha@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: proof of concept converter of rexgen-like syntax into
 john rules

On Sun, Mar 23, 2014 at 12:17:05PM +0100, magnum wrote:
> On 2014-03-22 22:13, Aleksey Cherepanov wrote:
> >I think rexgen-like syntax could be a part of rules and performed at
> >preprocessor level like []. For instance
> 
> This would only work for trivial regexes, a complicated one would produce
> too many rules. I'd still want a pure regexp mode.
> 
> Anyways, your script is something we could supply with Jumbo almost as-is. A
> "rule generator script" is probably what many people need, including Nima.
> Just add a shebang line, license blurb, brief docs and wrap "while ($rule =
> <>)" around the lot and I think we're set.

I am sorry for the delay.

I've implemented all missing features except -i option.

I did not test things well. Tests are still TODO. Also I'd like to
improve interface and add other whistles like named groups and
relative back refs.

We could try to add support for infinite quantifiers (like +) and
recursion with global length limit: a+b+ with limit 3 is ab, aab, abb.

I get all rules from command line instead of 'while ($rule = <>)'.

Back refs to undefined groups behave like in PCRE:
# rexgen2rules.pl: (a(?:\1|b)){2}
'1 A0"abaab" \]
'1 A0"abab" \]

Thanks!

-- 
Regards,
Aleksey Cherepanov

View attachment "rexgen2rules.pl" of type "text/x-perl" (16424 bytes)

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ