From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: steve-simon@ntlworld.nospam.com To: 9fans@cse.psu.edu MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-epowtwxvxnhzgazckmfsdmefvd" Subject: [9fans] pipeto for mydoom virus Date: Tue, 27 Jan 2004 16:01:31 +0000 Topicbox-Message-UUID: c241bfb2-eacc-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-epowtwxvxnhzgazckmfsdmefvd Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Hi, A pipeto clause to strip the mydoom virus. Add rot13 to /386/bin (attached) and the below to your pipeto if ( test -f $D/2/body && ! ~ `{unzip -sc < $D/2/body | rot13 | grep 'Version\\Explorer'} '' ){ log virus $RECIP From `{cat $D/replyto} exit 0 } -Steve --upas-epowtwxvxnhzgazckmfsdmefvd Content-Disposition: attachment; filename=rot13.c Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit #include #include #include #include Biobuf bin, bout; int main() { long got; char buf[1024], *p; Binit(&bin, 0, OREAD); Binit(&bout, 1, OWRITE); while((got = Bread(&bin, buf, sizeof(buf))) > 0){ for (p = buf; p < buf + got; p++) if (isalpha(*p)) if (tolower(*p) <= 'm') *p += 13; else *p -= 13; Bwrite(&bout, buf, got); } Bterm(&bout); } --upas-epowtwxvxnhzgazckmfsdmefvd--