當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。