http://bugzilla.spamassassin.org/show_bug.cgi?id=3010





------- Additional Comments From [EMAIL PROTECTED]  2004-02-05 14:37 -------
Subject: Re:  Implement base anti-worm plugin ...

On Thu, Feb 05, 2004 at 02:21:25PM -0800, [EMAIL PROTECTED] wrote:
> Okay, then.  How about a generic rule to handle position-specific
> decoded searches?  This isn't quite rich enough, but once we provide a
> way (an option, I think) for binary attachments to be decoded, the rest
> is easy.

This is trivial.

> body BINARY_EXE               eval:mime_part('part regexp','offset','body 
> regexp')
> 
> ...
> 
> body BINARY_EXE               
> eval:mime_part('','0','TV[pq]QAA[MI]AAAAEAA[8A]A')
> 
> except using a binary regexp instead of the stupid base64 version

Errr.  Well, it wouldn't be a normal body rule, it could be a full eval though.

full BINARY_EXE               eval:mime_part('','0','\xa0\xb0\xc0...\xf0')

Something like:

$part_regexp ||= qr/./;
$offset ||= 0;
$body_regexp ||= qr/./;
foreach my $p ( $self->{msg}->find_parts($part_regexp, 1) ) {
  $val = $p->decode();
  substr $val, 0, $offset = '';
  return 1 if ( $val =~ /$body_regexp/ );
}





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to