Rot13:将每个在字母表上的字母,用后数13个后的字母代替,若超过时则重新绕回26字母开头即可。
eg:A换成N、B换成O、依此类推到M换成Z,然后序列反转:N换成A、O换成B、最后Z换成M
1.密文 rot13在线解密
https://www.ctftools.com/down/
http://www.mxcz.net/tools/rot13.aspx
Converter 进制编码转换工具 链接:http://pan.baidu.com/s/1kVdy6Kv 密码:edxc
2、用python解密rot13
#! usr/bin/env python # coding:utf-8 import string upperdict = {} lowerdict = {} upperletters =string.ascii_uppercase lowerletters =string.ascii_lowercase dststr = [] oristr =raw_input('Enter string to rot13:') for i in range(0,len(lowerletters)): if i<13: lowerdict[lowerletters[i]] = lowerletters[i+13] else: lowerdict[lowerletters[i]] = lowerletters[i-13] for i in range(0,len(upperletters)): if i<13: lowerdict[upperletters[i]] = upperletters[i+13] else: lowerdict[upperletters[i]] = upperletters[i-13] for ch in oristr: if ch in lowerdict: dststr.append(lowerdict[ch]) elif ch in upperdict: dststr.append(upperdict[ch]) else: dststr.append(ch) dststr = ''.join(dststr) print(dststr )
注:本笔记参考dongyanwen6036的博客
----------------------------------------------------------------分割线---------------------------------------------------------
ps:萌新一枚,本文纯为学习笔记,以防某日犯傻忘记--。如有不妥处,望大佬们赐教~