- 论坛徽章:
- 0
|
自己解决了。
办法如下:echo base64encode(pack('H*','cfcd208495d565ef66e7dff9f98764da')); |
输出如下:
z80ghJXVZe9m59/5+Ydk2g==
在python中使用如下代码可以将其正确的解析出来
from struct import pack,unpack
from base64 import b64decode
def dechex(n):
"""return the hexadecimal string representation of integer n"""
return "%x" % n
a=b64decode('z80ghJXVZe9m59/5+Ydk2g==')
b=unpack('16B',a)
print b
d=[]
for i in b:
d.append(dechex(i))
print d |
['cf', 'cd', '20', '84', '95', 'd5', '65', 'ef', '66', 'e7', 'df', 'f9', 'f9', '87', '64', 'da'] |
|