uuencoding / uudecoding 有什么特殊的变体吗?
我编写了一个小程序,可以使用 uuencode/uudecode 对文本进行编码/解码。该代码基于 Wikipedia 中描述的算法。当我对字符串进行编码/解码时,它工作得很好。但我发现了一个无法解码的 uuencoded 文件。 这个网站可以解码该文件,但是当我再次对其进行编码时,我没有得到相同的文件。此外,当我仅解码文件的一行时,我无法获得可读文本(无论是使用我的程序还是使用我之前链接的解码器)。但在 uuenoding 中,所有线都是相互独立的 - 这一定是可以的。
有人知道 uuenoding 是否有一些维基百科上没有描述的特殊变体吗?我可以解码一些字符串,这样我的解码器就不会完全错误。也许有人写了自己的解码器,所以我发布整个文件:
begin 666 Restricted.zip
M4$L#!!0````(`%T[="_]<LYX`P(``'0#```.````4F5S=')I8W1E9"YT>'1M
M4\MNVT`0NQOP/TSNM@PT0!/X4N16`RE0%.GC.I9&TE;2CKH/J_K[<E;IX]"+
M'UJ20W)6^]U3)SX=]KO][D*]SD(7XHD2CX/S'26EU`L%U_6)9@E1?46NQ4,7
MR?E6P\3)J:=%@ABZY7'$P2MO"0J1GGT3Z;B1YJ#?I4ZT:!X;N@KI34)%3Y%6
MS8#>A#I-&[;E`-H%'(EY@G[/(-I',=GI;XN"H49?''YXT#LE]BNU.<!&,*(W
M0&4Y7V#,F_&11NV<-TNU-!D!>HZP5"MF91^YE0-D&H2C5CAL\T&P:#/'A*<+
M#F6(!IEXW?Q?13Q=@P[XLBHJ>L[UX,;U8+`"X3I)0S^RJX=Q+3-28)@@+IK:
MEAD@AQRM7DY)ICG%BK[:(,\=L$C>20*EUCR/8BP'&'H+.OT5:+`V>,*NK$%9
MZ<;>Q1X"1WJOBZ#_8HQ+`3?K%(U<1U-:7.HI6A]_+/V[\RU,J]DW!SMV@<37
M89W+>5QCL6/"MDHTQPV&UT5-<R!=?%D)MG^AR&Y3^>]::JP0H2MZ4>3UR?F,
M[>18,L'"..I2K'.,BP8TF<K)YT_/IG1S#<@VZ^,KX$QO'[\\WC_<W;V[?_-P
MW>^`/%.?TGP^G99EJ29MCC^K6JL\G%H78CJQC[CGU=S/V_M2KEN<A0?;A5U`
M[AC.U2*6OUOE0<KD#Q#\MM_]`E!+`0(4`!0````(`%T[="_]<LYX`P(``'0#
M```.``````````$`(`"V@0````!297-T<FEC=&5D+G1X=%!+!08``````0`!
+`#P````O`@``````
`
end
I have written a small program which can encode/decode a text with uuencode/uudecode. The code is based on the algorithm described on Wikipedia. It works fine when I encode/decode a string. But I have found a uuencoded file which I can't decode. This website can decode the file, but when I encode it again I don't get the same file. In addition, when I decode only one line of the file I don't get readable text (neither with my program nor with the decoder I linked before). But in uuenoding all lines are independent from each other - this must be able.
Do someone know whether there are some special variations of the uuenoding, which are not described on Wikipedia? I can decode some strings so my decoder can't be totally wrong. Perhaps someone has written his own decoder, so I post the whole file:
begin 666 Restricted.zip
M4$L#!!0````(`%T[="_]<LYX`P(``'0#```.````4F5S=')I8W1E9"YT>'1M
M4\MNVT`0NQOP/TSNM@PT0!/X4N16`RE0%.GC.I9&TE;2CKH/J_K[<E;IX]"+
M'UJ20W)6^]U3)SX=]KO][D*]SD(7XHD2CX/S'26EU`L%U_6)9@E1?46NQ4,7
MR?E6P\3)J:=%@ABZY7'$P2MO"0J1GGT3Z;B1YJ#?I4ZT:!X;N@KI34)%3Y%6
MS8#>A#I-&[;E`-H%'(EY@G[/(-I',=GI;XN"H49?''YXT#LE]BNU.<!&,*(W
M0&4Y7V#,F_&11NV<-TNU-!D!>HZP5"MF91^YE0-D&H2C5CAL\T&P:#/'A*<+
M#F6(!IEXW?Q?13Q=@P[XLBHJ>L[UX,;U8+`"X3I)0S^RJX=Q+3-28)@@+IK:
MEAD@AQRM7DY)ICG%BK[:(,\=L$C>20*EUCR/8BP'&'H+.OT5:+`V>,*NK$%9
MZ<;>Q1X"1WJOBZ#_8HQ+`3?K%(U<1U-:7.HI6A]_+/V[\RU,J]DW!SMV@<37
M89W+>5QCL6/"MDHTQPV&UT5-<R!=?%D)MG^AR&Y3^>]::JP0H2MZ4>3UR?F,
M[>18,L'"..I2K'.,BP8TF<K)YT_/IG1S#<@VZ^,KX$QO'[\\WC_<W;V[?_-P
MW>^`/%.?TGP^G99EJ29MCC^K6JL\G%H78CJQC[CGU=S/V_M2KEN<A0?;A5U`
M[AC.U2*6OUOE0<KD#Q#\MM_]`E!+`0(4`!0````(`%T[="_]<LYX`P(``'0#
M```.``````````I have written a small program which can encode/decode a text with uuencode/uudecode. The code is based on the algorithm described on Wikipedia. It works fine when I encode/decode a string. But I have found a uuencoded file which I can't decode. This website can decode the file, but when I encode it again I don't get the same file. In addition, when I decode only one line of the file I don't get readable text (neither with my program nor with the decoder I linked before). But in uuenoding all lines are independent from each other - this must be able.
Do someone know whether there are some special variations of the uuenoding, which are not described on Wikipedia? I can decode some strings so my decoder can't be totally wrong. Perhaps someone has written his own decoder, so I post the whole file:
(`"V@0````!297-T<FEC=&5D+G1X=%!+!08``````0`!
+`#P````O`@``````
`
end
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了解决方案!问题是我没有注意到第一行。该行保存有关编码数据的信息 - 名为
Restricted.zip
的文件。所以解码后的数据是一个 ZIP 文件,我只需解压它即可。我得到了一个名为
Restricted.txt
的文本文件,其中包含可读数据。这个问题很简单,但我花了几天时间才找到解决方案。
这是对打包算法的一个很好的改变——也许我接下来要做的就是编写自己的程序来打包/解包 zip 文件。
I found the solution! The problem was that I did not notice the first line. This line holds information about the data encoded - a file named
Restricted.zip
. So the decoded data is a ZIP file which I just had to unpack.I got a text file named
Restricted.txt
which contains the readable data.The problem was so easy, but it took me days to see its solution.
That's a good change over to packing algorithms - perhaps the next thing I do is writing my own program which can pack/unpack zip files.