email - convert text to binary/executable file (for e-mail attachments)

06
2013-08
  • Jeff

    My e-mail service provider blocks lots of attachments, but sends me a text attachment that has information such as the following:

        Content-Type: application/octet-stream; 
        name="filename.dll"
    Content-Disposition: attachment; 
        filename="filename.dll"
    Content-Transfer-Encoding: base64
    X-Attachment-Id: f_glf8g27u0
    
    TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAA8AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v
    ZGUuDQ0KJAAAAAAAAAA4khhIfPN2G3zzdht883YbYqHjG1vzdhtiofUb5vN2G3zzdht783YbWzUN
    G3fzdht883cb7/N2G2Kh8hsn83YbYqHkG33zdhtioecbffN2G1JpY2h883YbAAAAAAAAAAAAAAAA
    

    ...and the text goes on for a while.

    Is there any way I can convert this back to a meaningful file?

    Thanks!

  • Answers
  • slhck

    This attachment is encoded in Base64. From Wikipedia:

    Base64 encoding schemes are commonly used when there is a need to encode binary data that needs be stored and transferred over media that are designed to deal with textual data. This is to ensure that the data remains intact without modification during transport

    You just have to copy the data (i.e. the meaningless string) into an online Base64 decoder, like this one, or this one and then download the resulting file.

    You can also download an offline decoder that will generate the file directy.

    Obviously, you should name the file filename.dll. Mostly however, pictures in e-mails are Base64 encoded.


  • Related Question

    email - Detaching attachments from messages in Opera mail
  • random

    How do you detach or sever attachments from emails in Opera?

    In Thunderbird, you can easily right-click the file(s) and delete or detach. The message remains intact, but the cruft of unwanted file(s) is now gone.

    Is there a way to carry out this same, or a similar, operation in Opera Mail?

    Opera 9.63 on Windows XP (but open to methods on other versions/OS)


  • Related Answers
  • LachlanG

    Not to my knowledge. Not a bad idea for a feature though.