Help me turn this MIME attachment into something decipherable
April 6, 2008 9:39 AM   Subscribe

Content-Transfer-Encoding: base64? Content-Type: application/applefile? Help me turn this MIME attachment into something decipherable.

I was sent an important form as an email attachment with no three-letter extension. I opened it with a text editor, hoping to find some readable text among the gibberish, and saw the following:
--Apple-Mail-29-607603874
Content-Transfer-Encoding: base64
Content-Type: application/applefile;
        name=Financial Aid Recs 2008-09.doc
Content-Disposition: attachment;
        filename="Financial Aid Recs 2008-09.doc"

AAUWBwACAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAJAAAAPgAAAAoAAAADAAAASAAAAB4AAAACAAAA
ZgAAAT5XOEJOTVNXRAAQRmluYW5jaWFsIEFpZCBSZWNzIDIwMDgtMDkuZG9jAAABAAAAAQwAAAAM
AAAAMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAgHU1AgVXNlcgAAAQAAAAEMAAAADAAAADIAf+pAAQQAgAAcADIA
AFNUUiAAAAAKv+P//wAAAAAAfyUw

--Apple-Mail-29-607603874
Content-Transfer-Encoding: base64
Content-Type: application/octet-stream;
        x-mac-creator=4D535744;
        x-unix-mode=0644;
        x-mac-hide-extension=yes;
        x-mac-type=5738424E;
        name=Financial Aid Recs 2008-09.doc
Content-Disposition: attachment;
        filename="Financial Aid Recs 2008-09.doc"

0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAKQAAAAAAAAAA
EAAAKwAAAAEAAAD+////AAAAACgAAAD/////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////

...many lines of gibberish skipped -- no readable text anywhere...

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAA=

--Apple-Mail-29-607603874--
Renaming it as a .doc file and opening it with OpenOffice, I saw... exactly the same thing, still with no readable text.

What is this file? How can I turn it into something intelligible?
posted by nebulawindphone to Computers & Internet (3 answers total)
 
Looks like you saved the entire email as a file, judging from the human readable "Apple-Mail" headers. Emails typically break up attachments into chunks for transmission, which would be the blocks of gibberish between the headers. Try firing up your email application again and saving just the attachment. I this should yield the "Financial Aid Recs 2008-09.doc" file, which is likely a MS word document and should be openable with openoffice.
posted by waxboy at 9:50 AM on April 6, 2008


Best answer: Open it in a text editor and remove all headers. Also remove the first block, and leave yourself with just a text file starting with "0M8R4KGxGuEAA..."

I'm not sure about the two separate blocks of text. You might need to experiment with deleting the first one, or leaving them both in when you decode.

Anyway, run Perl on it:

perl -MMIME::Base64 -ne 'print decode_base64($_)' < textfile > "Financial Aid Recs 2008-09.doc"
posted by yath at 9:57 AM on April 6, 2008 [1 favorite]


Response by poster: Deleting the first block of text, and decoding the second according to yath's instructions, got me what I was looking for. Thanks.
posted by nebulawindphone at 10:13 AM on April 6, 2008


« Older Hide my SVK addiction   |   Cooking topside of beef Newer »
This thread is closed to new comments.