Re: quotes in arrays

From: Renaud Deraison (deraisonat_private)
Date: Wed Apr 30 2003 - 13:53:37 PDT

  • Next message: sulloat_private: "Re: quotes in arrays"

    On Wed, Apr 30, 2003 at 04:40:48PM -0400, sulloat_private wrote:
    > I was trying to update no404.nasl & found that if I put a quote (escaped) as one
    > of the errmsg elements, I was getting a nasl error. However, in the docs it
    > seems to say it should work.  This is latest Nessus engine.
    > 
    > string I tried:
    > errmsg[21] = "name=qt id=\"search\" size=40 value=\" \""; 
    > 
    > error:
    > parse error, expecting `';''[20528]() 
    > 
    > What's my problem? It needs to have the "s in there so it can verify the text
    > box is blank (therefore meaning the file wasn't found and the search page was
    > given).
    
    Quotes can't be escaped that way. Use '' as the quotes instead (warning
    : '' have the same properties for string(n), that is, '\n' means 0x0A)
    
    So you want :
    
    errmsg[21] = 'name=qt id="search" size=40 value=" "';
    
    
    Shall I add it in no404.nasl ?
    



    This archive was generated by hypermail 2b30 : Wed Apr 30 2003 - 13:50:40 PDT