Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Sat, 3 Apr 2010 20:36:42 +0400
From: Solar Designer <>
Subject: Re: JTR rule - insert digits/chars from start to end

On Sat, Apr 03, 2010 at 10:54:08AM +0200, wrote:
>  /a sa[eiouy] :[:c] >\r[00-9A-C] A\p0[0-9A-D],[ 
> 0-9?&%^*)(_=><:#-@...!:],

Assuming that the line was indeed not wrapped in your config file
(unlike it is in your message), your problem was that you did not escape
the second "-" character in your set of punctuation characters, so it
was interpreted as indicating a range of characters (all ASCII codes
from that of "#" through "@").  This range includes "," - your quoting
character - so you get incorrect syntax in one of the rules.

Prefixing that "-" character with a backslash solves the problem:

/a sa[eiouy] :[:c] >\r[00-9A-C] A\p0[0-9A-D],[0-9?&%^*)(_=><:#\-@...!:],

However, this can be optimized to:

/a sa[eiouy] [:c] >\r[00-9A-C] i\p0[0-9A-D][0-9?&%^*)(_=><:#\-@...!:]

BTW, changing from the "A" (insert string) to the "i" (insert character)
command also eliminates the potential issue with you inadvertently
"hitting" the quoting character again (the "i" command does not use a
quoting character).  You can further clean things up by encoding all
punctuation characters in a compact form:

/a sa[eiouy] [:c] >\r[00-9A-C] i\p0[0-9A-D][0-9!-/:-@[-`{-~]

If you did this with the "A" command, you'd need to use another quoting
character (not a comma).  I recommend that you use "q" for the quoting
character in such cases, e.g.:

/a sa[eiouy] [:c] >\r[00-9A-C] A\p0[0-9A-D]q[0-9!-/:-@[-`{-~]q

However, I do not recommend you to use the "A" command when you insert
just one character - just use "i" in those cases.  "A" is for
multi-character strings.


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.