Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Matts (1087)

  (email not shown publicly)

I work for MessageLabs [] in Toronto, ON, Canada. I write spam filters, MTA software, high performance network software, string matching algorithms, and other cool stuff mostly in Perl and C.

Journal of Matts (1087)

Wednesday November 06, 2002
10:14 AM

Uue, MIME, etc

[ #8798 ]

Has anyone written, or does anyone know of, some perl that will heuristically detect whether a line in an email (or section of an email) is base64 encoded, or uuencoded?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Far be it from me to tell you where to post, but it sounds like you are seeking Perl wisdom [].

  • If you see a line long string without whitespace, it likely is one of these. Differences are:
    • The alphabet is different. UUE uses Ascii codes 33 to 96, hence, no lowercase letters; bases64 uses mainly uppercase and lowercase letters, digits, and a few more characters. See table 1 []
    • UUE has a count byte up front, while base64 hasn't. So it's likely that the number of meaningful characters is 4*n+1 in UUE, and 4*n in base64. Also, you can check the value of the count byte.
    • For UUE, there should be a line "begi