加密数据:
7h%1.3F3E59%.t2.n3315E35mtFxe83%16Epp%it27227563%2a%1%F56383Fm2%5%28_7AfiF2E5%966
图解凯撒列阵加密
7表示有7行,从左到右竖着看。连起来是http%3A%2F%2Ff1.xiami.net%2F33821%2F337%5E31%2F%5E5%252%5E1768993653_6%5E6876.mp3
经过urldecode后变成 http://f1.xiami.net/33821/337^31/^5%2^1768993653_6^6876.mp3
把^变成0,就是 http://f1.xiami.net/33821/337031/05%201768993653_606876.mp3
逐步解析
调试图解
源码
from urllib import parse# 解密经过加密的dataMp3内容def dataMp3(s): num_loc = s.find('h') rows = int(s[0:num_loc]) strlen = len(s) - num_loc cols = int(strlen / rows) right_rows = strlen % rows new_s = list(s[num_loc:]) output = '' for i in range(len(new_s)): x = i % rows y = i / rows # p = 0 if x <= right_rows: p = x * (cols + 1) + y else: p = right_rows * (cols + 1) + (x - right_rows) * cols + y output += new_s[int(p)] return parse.unquote(output).replace('^', '0')
作者:GHope
链接:https://www.jianshu.com/p/3411b0e48581
点击查看更多内容
为 TA 点赞
评论
共同学习,写下你的评论
评论加载中...
作者其他优质文章
正在加载中
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦