public inbox for blinux-list@redhat.com
 help / color / mirror / Atom feed
From: Martin McCormick <martin@dc.cis.okstate.edu>
To: Linux for blind general discussion <blinux-list@redhat.com>
Subject: Extracting Binaries from MIME-Encoded messages
Date: Fri, 18 Jun 2004 10:28:39 -0500	[thread overview]
Message-ID: <200406181528.i5IFSd1E093655@dc.cis.okstate.edu> (raw)

	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


             reply	other threads:[~ UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
 Martin McCormick [this message]
 ` Kirk Reiser
 ` Mike Gorse
 ` Henry Yen
   ` Hart Larry
 Karl Dahlke
 Martin McCormick
 Martin McCormick
 Martin McCormick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200406181528.i5IFSd1E093655@dc.cis.okstate.edu \
    --to=martin@dc.cis.okstate.edu \
    --cc=blinux-list@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).