V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
TigerS
V2EX  ›  问与答

关于通天塔的邮箱,是什么一个原理?

  •  
  •   TigerS · 2013-04-18 02:31:15 +08:00 · 4384 次点击
    这是一个创建于 4035 天前的主题,其中的信息可能已经有所发展或是发生改变。
    在通天塔 t.tt的联系方式页面,有这么一段话

    Email & Gtalk (欢迎 GT 搞基):

    c2hvd2ZvbUBnbWFpbC5jb20K

    这个我理解就是一个邮箱,可是属于加密了的?怎么理解怎么破呢?
    18 条回复    1970-01-01 08:00:00 +08:00
    TigerS
        1
    TigerS  
    OP
       2013-04-18 02:45:50 +08:00
    @Showfom 问问本人看看
    jianqun
        2
    jianqun  
       2013-04-18 02:53:53 +08:00
    $ echo 'c2hvd2ZvbUBnbWFpbC5jb20K' | base64 -d
    TigerS
        3
    TigerS  
    OP
       2013-04-18 03:08:55 +08:00
    @jianqun 那如果要加密比如我邮箱[email protected]想要加密成那个样子该怎么办?
    TigerS
        4
    TigerS  
    OP
       2013-04-18 03:12:13 +08:00
    @jianqun 直接 $ echo '[email protected]' | base64 这样是吧?
    ivanlw
        5
    ivanlw  
       2013-04-18 03:13:03 +08:00
    @jianqun 好神奇,这种一个竖线,然后一个base64是属于什么命令?
    然后,要怎么加密呢…………
    TigerS
        6
    TigerS  
    OP
       2013-04-18 03:14:05 +08:00
    @ivanlw 好像是Linux下面的一种加密的命令
    jianqun
        7
    jianqun  
       2013-04-18 03:30:30 +08:00
    @TigerS 是的。
    echo '[email protected]' | base64
    jianqun
        8
    jianqun  
       2013-04-18 03:36:48 +08:00
    这个好像是叫「管线命令」。
    jianqun
        9
    jianqun  
       2013-04-18 03:37:05 +08:00
    @ivanlw 这个好像是叫「管线命令」。
    fangzhzh
        10
    fangzhzh  
       2013-04-18 08:09:29 +08:00
    @jianqun echo 'c2hvd2ZvbUBnbWFpbC5jb20K' | base64 -d -D 解码的话,是不是要大写的D.

    -d
    --debug Print verbose log messages during processing.

    -D
    --decode Decode incoming Base64 stream into binary data.
    fangzhzh
        11
    fangzhzh  
       2013-04-18 08:16:37 +08:00
    @ivanlw 管道. 第一个命令的输出是第二个命令的输入, 依此类推.
    举个例子, 只是演示用, 试用最基本的find 语法, 有其他更优雅的写法.

    find . | grep mp3 | grep beatles

    1 第一步, 查找当前目录的所有文件
    2 过滤出所有所有文件名中包含有mp3这三个字的文件
    3 从第二步的结果中再次过滤, 过滤出所有文件名包含beatles的文件

    三步下来, 基本相当于找当前目录下所有 文件名有beatles的mp3.
    dale
        12
    dale  
       2013-04-18 08:59:27 +08:00
    @ivanlw 问了防止乱发广告的人采集邮箱地址吧。
    lifanxi
        13
    lifanxi  
       2013-04-18 17:35:59 +08:00
    用echo和管道进行base64编解码时,最好加上-n,不然在编码时会多编一个换行符进去,解码时如果是老版base64程序,会报错。
    xi4oh4o
        14
    xi4oh4o  
       2013-04-18 23:00:20 +08:00 via Android
    echo svdphdpflgzvomapg | tr gvplozshadfm mioglaxhc4@.

    试试这个 :)
    TigerS
        15
    TigerS  
    OP
       2013-04-19 03:10:55 +08:00
    @xi4oh4o 这个属于什么编码什么原理呢? 前后部分是怎么样理解的?
    那个base64的很好理解 后面是一样的,这个是怎么操作的呢?怎么编码怎么解码
    Mutoo
        16
    Mutoo  
       2013-04-19 09:16:38 +08:00
    @TigerS
    tr 是利用转置密码表对字符进行替换实现加密的
    $ echo 'hello world' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    HELLO WORLD
    kingwkb
        17
    kingwkb  
       2013-04-19 09:23:05 +08:00
    Usage: base64 [OPTION]... [FILE]
    Base64 encode or decode FILE, or standard input, to standard output.

    -d, --decode decode data
    -i, --ignore-garbage when decoding, ignore non-alphabet characters
    -w, --wrap=COLS wrap encoded lines after COLS character (default 76).
    Use 0 to disable line wrapping

    --help display this help and exit
    --version output version information and exit

    With no FILE, or when FILE is -, read standard input.

    The data are encoded as described for the base64 alphabet in RFC 3548.
    When decoding, the input may contain newlines in addition to the bytes of
    the formal base64 alphabet. Use --ignore-garbage to attempt to recover
    from any other non-alphabet bytes in the encoded stream.

    Report base64 bugs to [email protected]
    TigerS
        18
    TigerS  
    OP
       2013-04-19 10:08:02 +08:00
    @Mutoo 也就是说后面两部分('abcdefghijklmnopqrstuvwxyz' 和 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'你的例子里面)是两个设置好的代码,然后对应位置将第一个变成第二个然后输出,是这样么?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1554 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 16:37 · PVG 00:37 · LAX 09:37 · JFK 12:37
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.