OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Simon White (simon_at_mtds.com)
Date: Mon Dec 02 2002 - 09:20:37 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    02-Dec-02 at 16:12, Sasa Babic (sbpharmacy.bg.ac.yu) wrote :
    > On Mon, Dec 02, 2002 at 01:59:41PM +0000, Simon White wrote:
    > > 02-Dec-02 at 11:44, Domingo Antonio (domingonetcomp.com.br) wrote :
    > >
    > > > And finaly, my rule above ( this rule is in all 3 files *_checks )
    > > > /name=\"*\.(BAT|COM|PIF|DLL|dll)\"/ REJECT NO SPAM HERE BABY!!!!
    > >
    > > /name=\".*\.(bat|com|pif|dll)\"/ REJECT message etc
    > >
    > > Check if PCRE is case sensitive or not. (.*) is "match anything" in
    > > regexp, not just (*) which means 1 or more of the previous token.
    > >
    > > Your regexp means match name= followed by one or more " followed by a
    > > dot, then an extension, then another "
    >
    > Sorry for nittpicking, but your regexp means one and only one " followed
    > by a dot etc. One other thing, no need for escaping \". Just a plain "
    > would be enough.

    You have to be nitpicky with regexp so you're right to come in on this
    one here. I was indeed wrong but so were you :)

    It means a " then anything (. is the wildcard token) then a real dot
    (escaped) then an extension. I'd still say my regexp would work, but I
    can't test it because I don't use PCRE I don't know if you have to
    escape " or not in PCRE.

    > I supose you'd want to put:
    > /name="?.*\.(bat|com|pif|dll)"?/ REJECT <message>
    >
    > Someone better correct me if I'm wrong. :)

    This doesn't look right to me. Are you saying ? is a replacement for .*
    ? I think ? means "preceding token is optional"

    Cheers,

    -- 
    [Simon White. vim/mutt. simonmtds.com. Foldinghome no log script yet...]
    UNIX is basically a simple operating system, but you have to be a genius
    to understand the simplicity.  -- Dennis Ritchie
    [Linux user #170823 http://counter.li.org. Home cooked signature rotator.]