Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111206155311.GA28719@openwall.com>
Date: Tue, 6 Dec 2011 19:53:11 +0400
From: Solar Designer <solar@...nwall.com>
To: john-users@...ts.openwall.com
Subject: Re: Insert words between digits

On Tue, Dec 06, 2011 at 12:15:46AM +0100, websiteaccess@...il.com wrote:
>  I have a wordlist formatted as following :
>  1234 254872 1234
> 
>  I woud like insert a word (house) between the first space and a second word (train) in the second space
> 
>  for the first word and 1st space the syntax is 
> /[ ] Dp Ap,house,
> 
>  that become 
> 
> 1234house254872 1234
> 
> but how to do for the second space ?

It's trivial:

/[ ] Dp Ap"house" /[ ] Dp Ap"train"

or you can do it in a fancier way:

%2[ ] Dp Ap"train" /[ ] Dp Ap"house"

or fancier yet:

%2[ ] valp /[ ] Dp Ap"house" vala Da Aa"train"

The first (trivial) example is probably the one you should actually use.
It assumes that the first word being inserted has no embedded space
characters in it, though.  If you are unsure of that (e.g., if you're
generating these rules from a wordlist, which might contain words with
embedded spaces), then you can use the fancier alternatives above.  Both
of them don't make this no-embedded-spaces assumption, and the
difference between them (as it relates to their use) is in that the
"fancier yet" example has the two words included in the rule in the
natural order.  Unfortunately, that rule has more commands and thus is
likely slower.

Alexander

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.