Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
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

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.