itemlen.py 文件源码

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

项目:IDACyber 作者: patois 项目源码 文件源码
def render_img(self, buf, addr, mouse_offs):
        colors = []
        start = addr
        end = start + len(buf)
        ea = start
        col1 = qRgb(0xDC, 0xDC, 0xDC)
        col2 = qRgb(0x00, 0x00, 0x00)
        cols = [col1, col2]

        pos = 0
        head = get_item_head(start)
        sz = get_item_size(start)
        if head < start:
            sz -= (start - head)
        while ea < end:
            for i in xrange(sz):
                colors.append(copy(cols[pos]))

            pos = (pos + 1) % len(cols)
            if ea + sz > end:
                sz = ea + sz - end
            ea += sz
            sz = get_item_size(ea)
        return colors
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号