当前位置: 首页>>代码示例>>Python>>正文


Python idaapi.netnode方法代码示例

本文整理汇总了Python中idaapi.netnode方法的典型用法代码示例。如果您正苦于以下问题:Python idaapi.netnode方法的具体用法?Python idaapi.netnode怎么用?Python idaapi.netnode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在idaapi的用法示例。


在下文中一共展示了idaapi.netnode方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: on_open

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import netnode [as 别名]
def on_open():
    global auto_wait
    global fhash
    print('revsync: file opened:', idaapi.get_root_filename())
    netnode.create(NETNODE_NAME)
    try: fhash = netnode.getblob(0, 'I').decode('ascii')
    except: fhash = None
    if not fhash:
        fhash = read_fhash()
        try: ret = netnode.setblob(fhash.encode('ascii'), 0, 'I')
        except: print('saving fhash failed, this will probably break revsync')

    if auto_is_ok():
        on_load()
        auto_wait = False
    else:
        auto_wait = True
        print('revsync: waiting for auto analysis')
        if not hasattr(IDP_Hooks, 'auto_empty_finally'):
            idaapi.register_timer(1000, wait_for_analysis) 
开发者ID:lunixbochs,项目名称:revsync,代码行数:22,代码来源:ida_frontend.py

示例2: repr

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import netnode [as 别名]
def repr(cls, nodeidx):
        res = []
        try:
            l1 = max(len(key or '') for key in cls.fiter(nodeidx))
            l2 = max(len("{!r}".format(cls.get(nodeidx, key))) for key in cls.fiter(nodeidx))
        except ValueError:
            l1, l2 = 0, 2

        for i, key in enumerate(cls.fiter(nodeidx)):
            value = "{:<{:d}s} : str={!r}, buffer={!r}, int={:#x}({:d})".format("{!r}".format(cls.get(nodeidx, key)), l2, cls.get(nodeidx, key, str), cls.get(nodeidx, key, buffer), cls.get(nodeidx, key, int), cls.get(nodeidx, key, int))
            res.append("[{:d}] {:<{:d}s} -> {:s}".format(i, key, l1, value))
        if not res:
            raise internal.exceptions.MissingTypeOrAttribute(u"{:s}.repr({:#x}) : The specified node ({:x}) does not have any hashvals.".format('.'.join(('internal', __name__, cls.__name__)), nodeidx, nodeidx))
        return '\n'.join(res)

# FIXME: implement a file-allocation-table based filesystem using the netnode wrappers defined above 
开发者ID:arizvisa,项目名称:ida-minsc,代码行数:18,代码来源:_netnode.py

示例3: __init__

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import netnode [as 别名]
def __init__(self):
        self.__penode = idaapi.netnode()
        self.__penode.create(peutils_t.PE_NODE) 
开发者ID:CvvT,项目名称:dumpDex,代码行数:5,代码来源:idautils.py

示例4: __init__

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import netnode [as 别名]
def __init__(self, netnode_name=OUR_NETNODE):
        self._netnode_name = netnode_name
        # self._n = idaapi.netnode(netnode_name, namelen=0, do_create=True)
        self._n = idaapi.netnode(netnode_name, 0, True) 
开发者ID:williballenthin,项目名称:ida-netnode,代码行数:6,代码来源:netnode.py

示例5: kill

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import netnode [as 别名]
def kill(self):
        self._n.kill()
        self._n = idaapi.netnode(self._netnode_name, 0, True) 
开发者ID:williballenthin,项目名称:ida-netnode,代码行数:5,代码来源:netnode.py

示例6: _paint_instructions

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import netnode [as 别名]
def _paint_instructions(self, instructions):
        """
        Paint instruction level coverage defined by the current database mapping.

        NOTE: we now use 'streaming' mode for instructions rather than this.
        """
        color = struct.pack("I", self.palette.coverage_paint+1)
        for address in instructions:
            set_abits(address, 0x40000)
            nn = netnode(address)
            nn.supset(20, color, 'A')
        self._painted_instructions |= set(instructions)
        self._action_complete.set() 
开发者ID:gaasedelen,项目名称:lighthouse,代码行数:15,代码来源:ida_painter.py

示例7: cached_fhash

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import netnode [as 别名]
def cached_fhash():
    return netnode.getblob(0, 'I').decode('ascii') 
开发者ID:lunixbochs,项目名称:revsync,代码行数:4,代码来源:ida_frontend.py

示例8: publish

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import netnode [as 别名]
def publish(data, **kwargs):
    if not auto_is_ok():
        return
    if fhash == netnode.getblob(0, 'I').decode('ascii'):
        client.publish(fhash, data, **kwargs)

### IDA Hook Classes ### 
开发者ID:lunixbochs,项目名称:revsync,代码行数:9,代码来源:ida_frontend.py

示例9: range

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import netnode [as 别名]
def range(cls):
        this = netnode.new()
        ok, start = netnode.start(this), netnode.index(this)
        if not ok: raise internal.exceptions.NetNodeNotFoundError(u"{:s}.range() : Unable to find first node.".format('.'.join(('internal', __name__, cls.__name__))))
        ok, end = netnode.end(this), netnode.index(this)
        if not ok: raise internal.exceptions.NetNodeNotFoundError(u"{:s}.range() : Unable to find end node.".format('.'.join(('internal', __name__, cls.__name__))))
        return start, end 
开发者ID:arizvisa,项目名称:ida-minsc,代码行数:9,代码来源:_netnode.py

示例10: renumerate

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import netnode [as 别名]
def renumerate(cls):
        start, end = cls.range()
        this = netnode.new()
        ok = netnode.end(this)
        if not ok:
            raise internal.exceptions.NetNodeNotFoundError(u"{:s}.renumerate() : Unable to find the end node.".format('.'.join(('internal', __name__, cls.__name__))))

        yield end, netnode.new(end)
        while end != start:
            ok = netnode.prev(this)
            if not ok: break
            end = netnode.index(this)
            yield end, netnode.new(end)
        return 
开发者ID:arizvisa,项目名称:ida-minsc,代码行数:16,代码来源:_netnode.py

示例11: fenumerate

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import netnode [as 别名]
def fenumerate(cls):
        start, end = cls.range()
        this = netnode.new()
        ok = netnode.start(this)
        if not ok:
            raise internal.exceptions.NetNodeNotFoundError(u"{:s}.fenumerate() : Unable to find the start node.".format('.'.join(('internal', __name__, cls.__name__))))

        yield start, netnode.new(start)
        while start != end:
            ok = netnode.next(this)
            if not ok: break
            start = netnode.index(this)
            yield start, netnode.new(start)
        return 
开发者ID:arizvisa,项目名称:ida-minsc,代码行数:16,代码来源:_netnode.py

示例12: falt

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import netnode [as 别名]
def falt(cls, node):
        for res in cls.valfiter(node, netnode.altfirst, netnode.altlast, netnode.altnext, netnode.altval):
            yield res
        return 
开发者ID:arizvisa,项目名称:ida-minsc,代码行数:6,代码来源:_netnode.py

示例13: ralt

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import netnode [as 别名]
def ralt(cls, node):
        for res in cls.valriter(node, netnode.altfirst, netnode.altprev, netnode.altnext, netnode.altval):
            yield res
        return 
开发者ID:arizvisa,项目名称:ida-minsc,代码行数:6,代码来源:_netnode.py

示例14: rsup

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import netnode [as 别名]
def rsup(cls, node):
        for res in cls.valriter(node, netnode.supfirst, netnode.supprev, netnode.supnext, netnode.supval):
            yield res
        return 
开发者ID:arizvisa,项目名称:ida-minsc,代码行数:6,代码来源:_netnode.py

示例15: fhash

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import netnode [as 别名]
def fhash(cls, node):
        for res in cls.hfiter(node, netnode.hashfirst, netnode.hashlast, netnode.hashnext, netnode.hashval):
            yield res
        return 
开发者ID:arizvisa,项目名称:ida-minsc,代码行数:6,代码来源:_netnode.py


注:本文中的idaapi.netnode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。