[Esa-l] Re: Idea: Multiple extension detector

John D. Hardin jhardin at wolfenet.com
Mon Jun 12 19:34:07 PDT 2000


On Mon, 12 Jun 2000, Brett Glass wrote:

> At 01:13 PM 6/12/2000, John D. Hardin wrote:
> 
> >The syntax of the poisoned-files list is a hybrid of standard regular
> >expressions and standard file globbing - I wanted it to look more like
> >extended file globbing than regular expressions, and entries get
> >interpreted a little before the comparison. Periods may be bare, they
> >will be escaped for the filename comparison RE; * and ? will be
> >converted to .* and .? for the RE.
> 
> Is anything else pre-escaped, or just periods?

Just periods.

> >After a bit of thought, a better version of the above is:
> >
> >   *.[a-z0-9]+.[a-z0-9]+
> >
> >Since the poisoning is only done on executable extensions, this will
> >catch (for example) "fnord.txt.com" (assuming you don't already poison
> >*.com).
> 
> I assume, since you're using only lowercase letters, that the
> filename is downcased before comparison. Correct?

The RE comparison in the perl script is case-insensitive.

> In any event, what we REALLY want to say in our pattern is
> 
> *.[a-z0-9]+.<executable-file-extension>
> 
> (which is ALMOST what we're saying already, but not quite).

True. I doubt, however, that something like:

  *.[a-z0-9]+.${MANGLE_EXTENSIONS}

would actually work... :)

--
 John Hardin KA7OHZ   ICQ#15735746   http://www.wolfenet.com/~jhardin/
 jhardin at wolfenet.com      pgpk -a finger://gonzo.wolfenet.com/jhardin
  768: 0x41EA94F5 - A3 0C 5B C2 EF 0D 2C E5  E9 BF C8 33 A7 A9 CE 76 
 1024: 0xB8732E79 - 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
  "Bother," said Pooh as he struggled with /etc/sendmail.cf, "it never
  does quite what I want. I wish Christopher Robin was here."
				-- Peter da Silva in a.s.r
-----------------------------------------------------------------------
   139 days until Daylight Savings Time ends





More information about the esd-l mailing list