Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1530207602.2435361.1544045275147@mail.yahoo.com>
Date: Wed, 5 Dec 2018 21:27:55 +0000 (UTC)
From: oayz <oayz@...oo.com>
To: john-users@...ts.openwall.com
Subject: Re: Quotation character in preprocessor

 Thanks for response. I should apply RTFM to myself:
"Although the use of the double-quote character is good for readability,you may use any other character not found in STR instead.  This isparticularly useful when STR contains the double-quote character." 
Thanks again - for great tool and superb support
Oscar
    On Wednesday, December 5, 2018, 11:07:40 AM PST, Solar Designer <solar@...nwall.com> wrote:  
 
 On Wed, Dec 05, 2018 at 06:49:00PM +0000, oayz wrote:
>  I need a rule with quotation mark. This rule works fine:
> : $[."]
> This obviously doesn't (quote inside quotes):
> : Az"[."]"

You can change this line to e.g.:

Az,[."],

which the preprocessor expands under-the-hood into two rules:

Az,.,
Az,",

Of course, there's no reason to use the "A" command for just one
character, but I assume you gave this as an example, and your actual use
is with longer strings.

> So I tried usual "escape" character, still getting "invalid rule":
> : Az"[.\"]"
> I think it should work - a bug?

No, and no.  The quote character is just a character you provide to the
"A" command telling it that you'll terminate the string with that
character.  It is not special to the preprocessor, so no reason to
escape it for the preprocessor.  In your case, the line expanded to:

Az"."
Az"""

where the second expanded rule is invalid: it appends an empty string
and is followed by an extra quote character in place where the parser
expects a command character.  Luckily, there's no command of that name,
so you get an error reported.

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.