From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.util.phx.redhat.com (8.12.10/8.12.10) with ESMTP id i5IFSfNv002736 for ; Fri, 18 Jun 2004 11:28:41 -0400 Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id i5IFSeK07783 for blinux-list@listman.util.phx.redhat.com; Fri, 18 Jun 2004 11:28:40 -0400 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i5IFSe007779 for ; Fri, 18 Jun 2004 11:28:40 -0400 Received: from dc.cis.okstate.edu (dc.cis.okstate.edu [139.78.100.219]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i5IFSee1005875 for ; Fri, 18 Jun 2004 11:28:40 -0400 Received: from dc.cis.okstate.edu (localhost.cis.okstate.edu [127.0.0.1]) by dc.cis.okstate.edu (8.12.6/8.12.6) with ESMTP id i5IFSd1E093655 for ; Fri, 18 Jun 2004 10:28:39 -0500 (CDT) (envelope-from martin@dc.cis.okstate.edu) Message-Id: <200406181528.i5IFSd1E093655@dc.cis.okstate.edu> To: Linux for blind general discussion Date: Fri, 18 Jun 2004 10:28:39 -0500 From: Martin McCormick X-RedHat-Spam-Score: 0 X-Loop: blinux-list@redhat.com Subject: Extracting Binaries from MIME-Encoded messages X-BeenThere: blinux-list@redhat.com X-Mailman-Version: 2.1.5 Precedence: junk Reply-To: Linux for blind general discussion List-Id: Linux for blind general discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jun 2004 15:28:41 -0000 I use nmh for reading Email. This user agent places each incoming message in to a directory with the name of a given folder such as inbox for all messages that don't belong in other folders. Is there a good utility for stripping attachments out of a message when it may contain one or more? Right now, I do it by hand when I need to and I can probably write a program to do it, but I thought I would check to see if that is necessary. The manual process is to copy the message to some scratch file, run vi on the scratch file and look for base64 which is one type of encoding, and then strip away all but the garbage of the 7-bit data which is the base64 representation of the binary. Then, I run a perl script that has been out on the Internet for years which is called base64decode. It's standard output is the decoded data stream. I know that base64 decoding is part of many applications so I want simply to be able to extract attachments that aren't understood or can't be displayed such as sound files, etc. By the way, it is kind of funny to see some of those spam messages that claim to be the document I requested or some other enticement to open them. When I do extract the binary just for fun and run strings on it, I see something like w32.dll or a message stating that this program can't run in DOS. I saw that on a file that had a .wav extension. Some poor Windows user was going to dance to some pretty bad music if they plaid that file. Martin McCormick WB5AGZ Stillwater, OK OSU Information Technology Division Network Operations Group