Site hosted by Angelfire.com: Build your free website today!

Office
  
Brigades
  
Forum
  
Zebulun
  
zZine
  
Chat
  
Search
  
Feedback

Blockhouse Hosting

uuencoding


[Security Forum FAQ] [CA Security Forum]
[contact security FAQ admin]




hi,
i'm a newbie when it comes to uuencoding. i would like to learn more about it. i tried google and learnt a lot but now i have a couple of files that are uuencoded but have had the "begin xyz filename" part missing from them. the xyz, is a number which i dont know how to find. would that matter in whether the file is decoded properly or not? if so, how do i know which number to use?

also, i noticed in the examples i saw of uuencoded files that each line began with an "M". is that a common convention / requitement?

the second file that i have which is uuencoded has weird characters in it like Ñ Þ © ‡ °  and even a blank space between the encoded message. i know this file is uuencoded. how would i decode it?

i'm on a windows machine and have atleast 4 programs for decoding uuencoded files, and 2 for encoding them. i've played around with them but cant find the answers to my questions, except that i think the "M" at the beginning of each line is vital.

please help
Inquisitive Mind





A Solaris manpage - pretty detailed :)

OUTPUT
stdout
The standard output is a text file (encoded in the character set of the current locale) that begins with the line:

"begin%s%s\n", , decode_pathname

and ends with the line:

end\n

In both cases, the lines have no preceding or trailing blank characters.

The algorithm that is used for lines in between begin and end takes three octets as input and writes four characters of output by splitting the input at six-bit intervals into four octets, containing data in the lower six bits only. These octets are converted to characters by adding a value of 0x20 to each octet, so that each octet is in the range 0x20-0x5f, and then it is assumed to represent a printable character. It then will be translated into the corresponding character codes for the codeset in use in the current locale. (For example, the octet 0x41, representing A , would be translated to A in the current codeset, such as 0xc1 if it were EBCDIC.)

Where the bits of two octets are combined, the least signi- ficant bits of the first octet are shifted left and combined with the most significant bits of the second octet shifted right. Thus the three octets A, B, C are converted into the four octets:

SunOS 5.8 Last change: 28 Mar 1995 2

Communication Commands uuencode(1C)

0x20 + (( A >> 2 ) & 0x3F)
0x20 + (((A << 4) ((B >> 4) & 0xF)) & 0x3F)
0x20 + (((B << 2) ((C >> 6) & 0x3)) & 0x3F)
0x20 + (( C ) & 0x3F)

These octets are then translated into the local character set.

Each encoded line contains a length character, equal to the number of characters to be decoded plus 0x20 translated to the local character set as described above, followed by the encoded characters. The maximum number of octets to be encoded on each line is 45.

I presume "mode" is the file mode in UNIX octet format (i.e. 660, 666, 700, 644 et al) as the man page doesn't really explain :)

~LtKer.Asmodai




CyberArmy::Forum v0.5d
Generated In 4.63754 seconds