I love Free software!  That was freakin' awesome.  I knew there had to
be a way.

Thanks,

Bryan 

On Tue, 2003-09-16 at 20:08, Corey Edwards wrote:
> On Tue, 2003-09-16 at 17:12, Bryan Murdock wrote:
> > My wife got an email from a friend with a gpg signature and a jpg
> > attatchment.  It messed everything up so all we have is the mime
> > encoded text.  I tried having her forward the email to me so I could
> > open it in evolution but I still just get a whole lot of meaningless
> > text instead of an image file.  We could have this friend re-send it
> > straght to me, but I thought to myself, I have the information here
> > and Linux rocks, there should be some manual way for me to take this
> > mime encoded text and get the image out.  Does any one know a way?
> 
> Is this the sort of data you mean?
> 
>         Content-Type: image/jpeg name="foobar.jpg"
>         Content-Transfer-Encoding: base64
>         
>         0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAA
>         EAAAJwAAAAEAAAD+////AAAAACQAAAD/////////////////
>         ////////////////////////////////////////////////
>         
> All those random characters are base64 encoded binary data. Since you
> can't send 8bit binary data through standard SMTP, they came up with a
> way to pack 2 binary bytes into 3 bytes of printable characters. The
> easiest way I've found to decode it is with perl (yeah, Jayce^ is a bad
> influence :).
> 
>   $ perl -e 'use MIME::Base64; while ($_=<>){ \
>     print decode_base64($_); }' >image.jpg
> 
> Type that into your shell and copy and paste the all the mumbo-jumbo
> text into it (don't include the header info). Out pops your image.
> 
> Corey
> 
> 
> 
> ____________________
> BYU Unix Users Group 
> http://uug.byu.edu/
> ___________________________________________________________________
> List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list


____________________
BYU Unix Users Group 
http://uug.byu.edu/ 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to