本文整理汇总了Python中idaapi.get_user_idadir方法的典型用法代码示例。如果您正苦于以下问题:Python idaapi.get_user_idadir方法的具体用法?Python idaapi.get_user_idadir怎么用?Python idaapi.get_user_idadir使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类idaapi
的用法示例。
在下文中一共展示了idaapi.get_user_idadir方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_disassembler_user_directory
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import get_user_idadir [as 别名]
def get_disassembler_user_directory(self):
return idaapi.get_user_idadir()
示例2: init
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import get_user_idadir [as 别名]
def init(self):
"""Set up menu hooks and implements search methods."""
valid_config = False
self.menu = None
config_file = os.path.join(idaapi.get_user_idadir(), 'virustotal.conf')
vtsetup = VTpluginSetup(config_file)
if vtsetup.check_version():
ida_kernwin.info('VirusTotal\'s IDA Pro Plugin\nNew version available!')
logging.info('[VT Plugin] There\'s a new version of this plugin!')
else:
logging.debug('[VT Plugin] No update available.')
if os.path.exists(config_file):
valid_config = vtsetup.read_config()
else:
answer = vtsetup.show_warning()
if answer == 1: # OK
vtsetup.auto_upload = True
valid_config = vtsetup.write_config()
elif answer == 0: # NO
vtsetup.auto_upload = False
valid_config = vtsetup.write_config()
elif answer == -1: # Cancel
valid_config = False
if valid_config:
checksample = CheckSample(vtsetup.auto_upload, vtsetup.file_path)
checksample.start()
self.menu = Popups()
self.menu.hook()
arch_info = idaapi.get_inf_structure()
try:
if arch_info.procName in self.SEARCH_STRICT_SUPPORTED:
VTGrepWildcards.register(self, 'Search for similar code')
VTGrepWildCardsStrict.register(
self,
'Search for similar code (strict)'
)
VTGrepWildCardsFunction.register(self, 'Search for similar functions')
elif arch_info.procName in self.SEARCH_CODE_SUPPORTED:
VTGrepWildcards.register(self, 'Search for similar code')
VTGrepWildCardsFunction.register(self, 'Search for similar functions')
else:
logging.info('\n - Processor detected: %s', arch_info.procName)
logging.info(' - Searching for similar code is not available.')
VTGrepBytes.register(self, 'Search for bytes')
VTGrepStrings.register(self, 'Search for string')
except:
logging.error('[VT Plugin] Unable to register popups actions.')
else:
logging.info('[VT Plugin] Plugin disabled, restart IDA to proceed. ')
ida_kernwin.warning('Plugin disabled, restart IDA to proceed.')
return idaapi.PLUGIN_KEEP