base65536.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:GCTF-challenges 作者: PlatyPew 项目源码 文件源码
def encode(value):
    """Encodes bytes to a base65536 string."""
    stream = io.StringIO()
    length = len(value)
    for x in range(0, length, 2):
        b1 = indexbytes(value, x)
        b2 = indexbytes(value, x + 1) if x + 1 < length else -1
        code_point = BLOCK_START[b2] + b1
        stream.write(unichr(code_point))
    return stream.getvalue()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号