http://snailwarrior.blog.51cto.com/680306/142472/

2.从标准输入读取文件内容,base64编码并打印到标准输出

[root@localhost test]# base64
snailwarrior
c25haWx3YXJyaW9yCg==

我是输入snailwarrior,回车,然后按Ctrl+D结束文件输入的。

 

3、对字符串"snailwarrior"编码,并打印到标准输出

[root@localhost test]# echo "snailwarrior" | base64
c25haWx3YXJyaW9yCg==

 

4、Base64解码

[root@localhost test]# echo "snailwarrior" | base64 | base64 -d
snailwarrior
base64: invalid input

 

http://www.centoscn.com/CentosBug/osbug/2013/0813/1229.html

RHEL5自带的base64工具有BUG,base64解码时莫名出错:base64: invalid input。
使用源码包编译安装:

 

wget http://www.fourmilab.ch/webtools/base64/base64-1.5.tar.gz
tar zxf base64-1.5.tar.gz
cd base64-1.5
./configure
make && make -n install

base64 -d gfwlist.txt gfwlist_base64.txt

这个东西的配置似乎不对,还是不行

 

不过可以在解压后的路径里直接处理

[root@localhost base64-1.5]# echo "snailwarrior" | ./base64 | ./base64 -d
snailwarrior

这里的base64-1.5是文件夹

 

相关文章:

  • 2022-12-23
  • 2021-07-22
  • 2021-12-07
  • 2021-11-13
  • 2021-10-29
  • 2022-12-23
猜你喜欢
  • 2021-08-21
  • 2021-10-23
  • 2021-08-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案