本文整理汇总了Python中idaapi.process_ui_action方法的典型用法代码示例。如果您正苦于以下问题:Python idaapi.process_ui_action方法的具体用法?Python idaapi.process_ui_action怎么用?Python idaapi.process_ui_action使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类idaapi
的用法示例。
在下文中一共展示了idaapi.process_ui_action方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __call__
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import process_ui_action [as 别名]
def __call__(self):
if self.__idx >= len(self.__action_list):
return False
# Execute one action
idaapi.process_ui_action(
self.__action_list[self.__idx],
self.__flags)
# Move to next action
self.__idx += 1
# Reschedule
return True
# --------------------------------------------------------------------------
示例2: graph_zoom_100
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import process_ui_action [as 别名]
def graph_zoom_100():
idaapi.process_ui_action('GraphZoom100')
示例3: graph_zoom_fit
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import process_ui_action [as 别名]
def graph_zoom_fit():
idaapi.process_ui_action('GraphZoomFit')
示例4: ProcessUiActions
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import process_ui_action [as 别名]
def ProcessUiActions(actions, flags=0):
"""
@param actions: A string containing a list of actions separated by semicolon, a list or a tuple
@param flags: flags to be passed to process_ui_action()
@return: Boolean. Returns False if the action list was empty or execute_ui_requests() failed.
"""
# Instantiate a helper
helper = __process_ui_actions_helper(actions, flags)
return False if len(helper) < 1 else idaapi.execute_ui_requests((helper,))
# -----------------------------------------------------------------------
示例5: load_clr_file
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import process_ui_action [as 别名]
def load_clr_file(filepath):
event_filter = TemporaryFilter(filepath)
qApp.installEventFilter(event_filter)
return idaapi.process_ui_action('SetColors')
示例6: activate
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import process_ui_action [as 别名]
def activate(self, ctx):
action = fuzzy_search_main()
if action:
idaapi.process_ui_action(action)
return 1
示例7: fix_graph_layout
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import process_ui_action [as 别名]
def fix_graph_layout():
def fun():
idaapi.update_action_state("GraphLayout", 0)
idaapi.process_ui_action("GraphLayout")
idaapi.execute_ui_requests((fun,))
示例8: fuzzy_search_main
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import process_ui_action [as 别名]
def fuzzy_search_main():
# Create form
global f, choices, names
choices = {}
names = []
gc.collect()
# Runtime collector.
# Pros
# 1. No need to refresh automatically.(When GDB start, libc symbol,PIE's symbol,etc... address will change.When user rename symbol, also.)
# 1.1. If you want to search library's function, view module list and right-click onto target library. Then click "Analyze module".
# 2. Action's state is collect (When user start typing, active window is FuzzySearchForm. So filter doesn't works correctly. ex: OpHex is active at Disas view but not active at FuzzySearchForm.)
# Cons
# 1. Become slow in case large file.
# 1.1. Re-generate dictionary isn't matter.(But scoring time will be bigger.)
# func ptr and icon id
registered_actions = get_registered_actions()
for action in registered_actions:
# IDA's bug? tilde exists many times in label. ex) Abort -> ~A~bort
# So fix it.
label = get_action_label(action).replace('~', '')
icon = get_action_icon(action)[1]
desctription = get_action_tooltip(action)
if get_action_state(action)[1] > idaapi.AST_ENABLE:
continue
choices[label] = Commands(fptr=process_ui_action, args=[action], description=desctription, icon=icon)
# Functions()
# Heads()
for n in Names():
demangled = idc.demangle_name(n[1], idc.get_inf_attr(idc.INF_SHORT_DN))
name = demangled if demangled else n[1]
# jump to addr
choices[name] = Commands(fptr=jumpto, args=[n[0]], description="Jump to " + name, icon=124)
for n in Structs():
choices[n[2]] = Commands(fptr=open_structs_window, args=[n[1]],
description="Jump to Structure definition of " + n[2], icon=52)
for k, v in choices.items():
names.append(k)
f = FuzzySearchForm()
# Compile (in order to populate the controls)
f.Compile()
f.iStr1.value = ""
# Execute the form
ok = f.Execute()
if ok == 1 and len(f.EChooser.items) > 0:
f.get_selected_item().execute()
# Dispose the form
f.Free()