On Sun, 05 Aug 2001 20:56:52 -0700 (PST)  "Shawn Tayler" wrote:
> ------168E5737_Outlook_Express_message_boundary
> Content-Type: application/mixed; name=slamdunk.zip.bat
> Hi Guys,
> 
> I have a binary that was part of an email.  The attachment got screwed
> up somehow, my email client doesn't recognize it as such.  It like to
> recover the binary file from text msg.  Is there a command line
> application that will do this sort of thing?
> 

For the general edification of the list... 8-)

--------------------- cut----------------
#!/usr/bin/perl

#       Usage: strip_mime < input > output
#       Create a file and unpack mimed attachment to
#       it. Modified from unmime in gclib, now handles
#       multiple attachments.

#       write unmimed part to STDOUT

#       Alan Jackson 5/95

while (<>) {
        binmode STDOUT;
        chop;

        s/=+$//;
        if (m|[^A-Za-z0-9+/]|) { next; }

        tr|[B-Za-z0-9+/A]|[!-`]|;

        $M=sprintf("%c%s",length($_)*3/4+32,$_);
        print STDOUT unpack("u",$M);
}
--------------cut-------------------

-- 
-----------------------------------------------------------------------
| Alan K. Jackson            | To see a World in a Grain of Sand      |
| [EMAIL PROTECTED]          | And a Heaven in a Wild Flower,         |
| www.ajackson.org           | Hold Infinity in the palm of your hand |
| Houston, Texas             | And Eternity in an hour. - Blake       |
-----------------------------------------------------------------------

_______________________________________________
http://linux.nf -- [EMAIL PROTECTED]
Archives, Subscribe, Unsubscribe, Digest, Etc 
->http://linux.nf/mailman/listinfo/linux-users

Reply via email to