當前位置: 首頁>>代碼示例>>Python>>正文


Python idaapi.get_kernel_version方法代碼示例

本文整理匯總了Python中idaapi.get_kernel_version方法的典型用法代碼示例。如果您正苦於以下問題:Python idaapi.get_kernel_version方法的具體用法?Python idaapi.get_kernel_version怎麽用?Python idaapi.get_kernel_version使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在idaapi的用法示例。


在下文中一共展示了idaapi.get_kernel_version方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: is_ida_version_supported

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import get_kernel_version [as 別名]
def is_ida_version_supported():
    """
    Check which IDA version is supported
    """
    major, minor = map(int, idaapi.get_kernel_version().split("."))
    if major >= 7:
        return True
    print("GhIDA:: [!] IDA Pro 7.xx supported only")
    return False 
開發者ID:Cisco-Talos,項目名稱:GhIDA,代碼行數:11,代碼來源:lib.py

示例2: _init_version

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import get_kernel_version [as 別名]
def _init_version(self):

        # retrieve IDA's version #
        disassembler_version = idaapi.get_kernel_version()
        major, minor = map(int, disassembler_version.split("."))

        # save the version number components for later use
        self._version_major = major
        self._version_minor = minor
        self._version_patch = 0

    #--------------------------------------------------------------------------
    # Properties
    #-------------------------------------------------------------------------- 
開發者ID:gaasedelen,項目名稱:lighthouse,代碼行數:16,代碼來源:ida_api.py

示例3: __version__

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import get_kernel_version [as 別名]
def __version__():
    # api doesn't exist, go back to a crazy version.
    if not hasattr(idaapi, 'get_kernel_version'):
        return 6, 0, 6.0

    import math
    res = str(idaapi.get_kernel_version())      # force it to a str because IDA 7.0 "fixed" it
    major, minor = map(int, res.split('.', 2))
    minor = int("{:<02d}".format(minor))
    if minor > 0:
        count = math.floor(math.log(minor) / math.log(10) + 1)
        return major, minor, float(major) + minor/10**count
    return major, minor, float(major)

## inject the version info into idaapi 
開發者ID:arizvisa,項目名稱:ida-minsc,代碼行數:17,代碼來源:__root__.py


注:本文中的idaapi.get_kernel_version方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。