Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 21 Sep 2012 00:04:13 +0200
From: Frank Dittrich <>
Subject: Spaces ... in rules (was: Library for manipulating rules)

On 09/20/2012 11:20 PM, Simon Marechal wrote:
> On a related note, how do you write rules with spaces in them, such as
> overstrike, insert or append ?

I've been using something like i1[ ], but learned that this is probably
not needed.
Looks like when adding extra spaces for better readability has been
introduced, it has been taken care of to expect these additional spaces
only in places where they cannot be mistaken as a part of an existing

I am sure Solar posted a rule which just contained the space where it
belonged, but added a colon at the end of the line, so that the trailing
space wouldn't be inadvertently deleted.
Something like
/_s_ :

(Unfortunately, I am currently unable to find that mail, not sure
whether this was on john-users or another mailing list.)

So, these should work (and they do indeed worked, just tested it):
^ :
$ :
i1 :
o0 :

The trailing colon shouldn't be required, but if no other commands
follow, john complains:

$ ./john --wordlist=test --rules=test --stdout > test2
Invalid rule in ./john.local.conf at line 6: Unexpected end of rule

Looks like john is removing trailing spaces even before analyzing the rules.

This rule applied to the word "test" (without "")
o0 i2 :
gives " e st" (also without "").

> Right now I am emulating this with Ax" "
> and Dx. Also, how to append " with the A command ?

A~[ -z][ -z]~

The only problem is if you want to append multiple arbitrary ascii
characters, because the delimiters need to be different from the
characters you want to insert.
Not sure whether a non-ascii character would work here, it encoded in a
single byte code page.
But the tab character (0x09) does the trick as well.
Unfortunately, a trailing tab is deleted as well, so you would have to
add a colon as a dummy command here.

This will resolve to 9025 (95^2) different rules:
A2	[ -~][ -~]	:


Powered by blists - more mailing lists

Your e-mail address:

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