base64中出现+(62),/(63)
+ 62 011111 可能的base64原文的部分为:01111100(ox7C对应的ascii码为|)、01111101(ox7D对应的ascii码为})、01111110(ox7E对应的ascii码为~)、01111111(ox7F对应的ascii码为DEL 删除)、00111110(ox3E对应的ascii码为>)、00111111(ox3F对应的ascii码为?)、00011111(ox1F对应的ascii码为US 单元分隔符)、01011111(ox5F对应的ascii码为_)
/ 63 111111 可能的base64原文的部分为:01111110(ox7E对应的ascii码为~)、01111111(ox7F对应的ascii码为DEL 删除)、00111111(ox3F对应的ascii码为?)
总结:(|,},~,>,?,_)这个集合中的值与其他值组合的结果经过base64后的结果中才可能出现+和/
备注上我测试用的代码---目的是随机组合找到base64结果中能出现+或/的情况:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import base64
import hashlib
import random
def filewriteappend(path,value):
f=open(path,'a')
f.write(value)
f.close
def main():
while(1):
list1=random.sample('abcdefghijklmnopqrstuv!@#$%^&*()-=+_/<>{}|\wxyz0123456789',10)
list2=random.sample('0123456789',5)
str1=""
str2=""
str1 = str1.join(list1)
print str1
str2=str2.join(list2)
i=str1+"/helloworld/test.mp4"+str2
u = i.encode('utf-8')
mu = hashlib.md5()
mu.update(u)
md5str=mu.hexdigest()
print md5str
beforeBase64=md5str[8:24]
print beforeBase64
base64_output = base64.b64encode(beforeBase64)
print base64_output
resultLine=str1+" "+beforeBase64+" "+base64_output+"\n"
filewriteappend("/home/shell/log/temp.log",resultLine)
if __name__ == '__main__':
main()
举例:*8*%a?/test.zip1458647800 -》base64后-》KjgqJWE/L3Rlc3QuemlwMTQ1ODY0NzgwMA==
阅读(5489) | 评论(0) | 转发(0) |