Base64 and the Two-Bit Tramp

Base64 and the Two-Bit Tramp

Now, if that’s not a confusing enough title, I don’t know what is, hee hee.

A friend forwarded me an attachment recently.  He uses AOL service.  AOL is the only service that I’ve ever received garbled attachments from in email.  It is usually when a forwarded email is forward several times.  After clicking through three attachments, I get the final attachment; a file named ATT00036.txt.  Opening it up shows this (i’ve only excerpted a portion):

Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment
From:
XXXXXX3@aol.com
To: phermaii@optonline.net,
.
.
Subject: “The Wedding Invitation”
MIME-Version: 1.0
Content-Type: multipart/related;
boundary=”—-=_NextPart_000_0117_01C8F629.76D260D0″
X-Mailer: Unknown sub 34
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
Thread-Index: Acjs+2GxzdWXL8VWRHi3FBx68hfLTQ==
X-Spam-Flag: NO
This is a multi-part message in MIME format.
——=_NextPart_000_0117_01C8F629.76D260D0
Content-Type: multipart/alternative;
boundary=”—-=_NextPart_001_0118_01C8F629.76D260D0″
——=_NextPart_001_0118_01C8F629.76D260D0
Content-Type: text/plain;
charset=”us-ascii”
Content-Transfer-Encoding: 7bit
Here’s the wedding invitation
Now a picture of
Mr. & Mrs. ‘The Doctor’
——=_NextPart_000_0117_01C8F629.76D260D0
Content-Type: image/jpeg;
name=”image001.jpg”
Content-Transfer-Encoding: base64
Content-ID:
X.MA1.1216841782@aol.com
/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB
AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEB
AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAK7ApUDASIA
AhEBAxEB/8QAHwAAAQQCAwEBAAAAAAAAAAAAAwABBAgHCQIFCgYL/8QAfhAAAQEGAgYFBgcJCgcK
CAIbAQMCBQYHESEEMQAIEhNBURQiI2FxCRYyQoGRFSQzNFKhsRdDRFRiZHJ0wRglJlOChJKi0fA1
Y5SywtLhChknNjdFV3PT8Sg4RlVlg6Ti40dWdZOVlpfVdoWls8PyKVhmd6OmtcbWZ4e2xdT/xAAb
AQEAAwEBAQEAAAAAAAAAAAAAAQMEAgUGB//EAFQRAAECAwQFBwcHCAgGAwADAQERIQAxQQJRYXED
BIGRoQUGEhNisfAUIjJCUsHRFTNzkrLh8RYkNlRVcoLSJTRFY2V1ouIjJjVDU9NklcKFo9XD/9oA
.
.
jVec/tM/Gr4X+M/g5r3h/wAN+Kft+pXRtzBAbG5i3bLiN2
+aSNR91WPJ7UUUrsD/2Q==
——=_NextPart_000_0117_01C8F629.76D260D0–

 

Having worked on a mail program before (Netpliance Inc.) I recognized that the mail was being sent in the “Internet” format (MIME) rather than being interpreted in a friendly way by mail programs along the way.  You see “binary” data such as images cannot be sent across the Internet unless they have been converted to a “text” (ascii) format. This format is usually Base64.  That’s the aSNR91WPJ7UUUrsD/2Q== gobbly-gook that you see above. Anyway, all I did was cut and paste that Base64 data, I used this online Base64 decoding site, and voila, I got this wedding invitation:

WeddingInvitation

Leave a Reply