### Start EA and SP Source: https://python.docs.hex-rays.com/_sources/ida_ida/index.rst.txt Functions to get and set the starting Effective Address (EA) and Stack Pointer (SP) of the program. ```APIDOC ## inf_get_start_ea() ### Description Retrieves the starting Effective Address (EA). ### Method GET ### Endpoint /inf_get_start_ea ## inf_set_start_ea(v: ida_idaapi.ea_t) ### Description Sets the starting Effective Address (EA). ### Method POST ### Endpoint /inf_set_start_ea ### Parameters #### Query Parameters - **v** (ida_idaapi.ea_t) - Required - The new starting Effective Address. ## inf_get_start_sp() ### Description Retrieves the starting Stack Pointer (SP). ### Method GET ### Endpoint /inf_get_start_sp ## inf_set_start_sp(v: ida_idaapi.ea_t) ### Description Sets the starting Stack Pointer (SP). ### Method POST ### Endpoint /inf_set_start_sp ### Parameters #### Query Parameters - **v** (ida_idaapi.ea_t) - Required - The new starting Stack Pointer. ``` -------------------------------- ### ida_bytes.prev_head Source: https://python.docs.hex-rays.com/ida_bytes/index.html Gets the start address of the previous defined item. ```APIDOC ## ida_bytes.prev_head ### Description Get start of previous defined item. ### Parameters * **ea** (ida_idaapi.ea_t_) - Begin search at this address. * **minea** (ida_idaapi.ea_t_) - Included in the search range. ### Returns BADADDR if none exists. ``` -------------------------------- ### Request Start Process Source: https://python.docs.hex-rays.com/_sources/ida_dbg/index.rst.txt Posts a request to start a process in the debugger. This is the asynchronous counterpart to `start_process`. ```APIDOC ## request_start_process(path: str = None, args: str = None, sdir: str = None) -> int ### Description Posts a start_process() request. ### Parameters #### Path Parameters - **path** (str) - Optional - Description: Path to the executable to start. - **args** (str) - Optional - Description: Arguments to pass to the process. - **sdir** (str) - Optional - Description: Starting directory for the process. ### Returns - **int**: -1: impossible to create the process - **int**: 0: the starting of the process was cancelled by the user - **int**: 1: the process was properly started ``` -------------------------------- ### prev_head Source: https://python.docs.hex-rays.com/_sources/ida_bytes/index.rst.txt Gets the starting address of the previous defined item. The search begins at 'ea' and includes 'minea'. Returns BADADDR if no such item exists. ```APIDOC ## prev_head ### Description Get start of previous defined item. ### Parameters #### Path Parameters - **ea** (ida_idaapi.ea_t) - Required - Begin search at this address. - **minea** (ida_idaapi.ea_t) - Required - Included in the search range. ### Returns - **ida_idaapi.ea_t** - BADADDR if none exists. ``` -------------------------------- ### Optimizer Handler Installation Source: https://python.docs.hex-rays.com/_sources/ida_hexrays/index.rst.txt Functions to install and remove optimization instruction and block handlers. ```APIDOC ## Optimizer Handler Installation ### Description Functions to install and remove optimization instruction and block handlers. ### Functions - `hx_install_optinsn_handler` - `hx_remove_optinsn_handler` - `hx_install_optblock_handler` - `hx_remove_optblock_handler ``` -------------------------------- ### install_user_defined_prefix Source: https://python.docs.hex-rays.com/ida_lines/index.html Installs a user-defined prefix. ```APIDOC ## Function: install_user_defined_prefix ### Description Installs a user-defined prefix. ### Signature `install_user_defined_prefix() -> bool` ``` -------------------------------- ### Start Process Source: https://python.docs.hex-rays.com/_sources/ida_dbg/index.rst.txt Starts a new process under the debugger. This function can be called asynchronously. ```APIDOC ## start_process(path: str = None, args: str = None, sdir: str = None) -> int ### Description Starts a process in the debugger. ### Parameters #### Path Parameters - **path** (str) - Optional - Description: Path to the executable to start. - **args** (str) - Optional - Description: Arguments to pass to the process. - **sdir** (str) - Optional - Description: Starting directory for the process. ### Returns - **int**: -1: impossible to create the process - **int**: 0: the starting of the process was cancelled by the user - **int**: 1: the process was properly started ``` -------------------------------- ### User Defined Prefix Installation Source: https://python.docs.hex-rays.com/ida_lines/index.html Installs a user-defined prefix handler for customizing line prefixes. ```APIDOC ## `ida_lines.install_user_defined_prefix` ### Description Installs a user-defined prefix handler. ### Parameters * `*args_`: Arguments for the installation, specific to the implementation. ### Returns * `bool`: True if the handler was installed successfully, False otherwise. ``` -------------------------------- ### Start Segment and IP Source: https://python.docs.hex-rays.com/_sources/ida_ida/index.rst.txt Functions to get and set the starting segment and instruction pointer (IP) of the program. ```APIDOC ## inf_get_start_ss() ### Description Retrieves the starting stack segment (SS). ### Method GET ### Endpoint /inf_get_start_ss ## inf_set_start_ss(v: sel_t) ### Description Sets the starting stack segment (SS). ### Method POST ### Endpoint /inf_set_start_ss ### Parameters #### Query Parameters - **v** (sel_t) - Required - The new starting stack segment. ## inf_get_start_cs() ### Description Retrieves the starting code segment (CS). ### Method GET ### Endpoint /inf_get_start_cs ## inf_set_start_cs(v: sel_t) ### Description Sets the starting code segment (CS). ### Method POST ### Endpoint /inf_set_start_cs ### Parameters #### Query Parameters - **v** (sel_t) - Required - The new starting code segment. ## inf_get_start_ip() ### Description Retrieves the starting instruction pointer (IP). ### Method GET ### Endpoint /inf_get_start_ip ## inf_set_start_ip(v: ida_idaapi.ea_t) ### Description Sets the starting instruction pointer (IP). ### Method POST ### Endpoint /inf_set_start_ip ### Parameters #### Query Parameters - **v** (ida_idaapi.ea_t) - Required - The new starting instruction pointer. ``` -------------------------------- ### ev_setup_til Source: https://python.docs.hex-rays.com/ida_idp/index.html Sets up default type libraries after loading a new file into the database. ```APIDOC ## ev_setup_til ### Description Setup default type libraries. (called after loading a new file into the database). The processor module may load tils, setup memory model and perform other actions required to set up the type system. This is an optional callback. ### Returns * void: This callback does not return a value. ``` -------------------------------- ### Private Range Start EA Functions Source: https://python.docs.hex-rays.com/_sources/ida_ida/index.rst.txt Functions to get and set the start address of the private range. ```APIDOC ## ida_ida.inf_get_privrange_start_ea ### Description Gets the start address of the private range. ### Method GET ### Endpoint /ida/inf/privrange_start_ea ## ida_ida.inf_set_privrange_start_ea ### Description Sets the start address of the private range. ### Method POST ### Endpoint /ida/inf/privrange_start_ea ### Parameters #### Request Body - **ea** (int) - Required - The start address of the private range. ``` -------------------------------- ### idautils.StringItem.setup Source: https://python.docs.hex-rays.com/idautils/index.html Sets up the string iteration parameters. ```APIDOC ## idautils.StringItem.setup(_strtypes_=[ida_nalt.STRTYPE_C]_, _minlen_=5_, _only_7bit_=True_, _ignore_instructions_=False_, _display_only_existing_strings_=False_) ### Description Sets up the string iteration parameters. ``` -------------------------------- ### setup_outctx Source: https://python.docs.hex-rays.com/_sources/ida_ua/index.rst.txt Initializes the output context. This function is typically used internally by the kernel. ```APIDOC ## setup_outctx(prefix: str, makeline_flags: int) -> None ### Description Initialization; normally used only by the kernel. ### Parameters #### Path Parameters - **prefix** (str) - Required - **makeline_flags** (int) - Required ``` -------------------------------- ### ev_setup_til Source: https://python.docs.hex-rays.com/_sources/ida_idp/index.rst.txt Optional callback invoked after loading a new file into the database. It allows the processor module to load type libraries, set up the memory model, and perform other actions to initialize the type system. ```APIDOC ## ev_setup_til ### Description Setup default type libraries. (called after loading a new file into the database). The processor module may load tils, setup memory model and perform other actions required to set up the type system. This is an optional callback. ### Returns - void ``` -------------------------------- ### ida_bytes.get_item_head Source: https://python.docs.hex-rays.com/ida_bytes/index.html Gets the start address of the item at the specified address. ```APIDOC ## ida_bytes.get_item_head ### Description Get the start address of the item at ‘ea’. If there is no current item, then ‘ea’ is returned. ### Parameters * **ea** (ida_idaapi.ea_t_) - The address to query. ``` -------------------------------- ### ida_bytes.next_head Source: https://python.docs.hex-rays.com/ida_bytes/index.html Gets the start address of the next defined item. ```APIDOC ## ida_bytes.next_head ### Description Get start of next defined item. ### Parameters * **ea** (ida_idaapi.ea_t_) - Begin search at this address. * **maxea** (ida_idaapi.ea_t_) - Not included in the search range. ### Returns BADADDR if none exists. ``` -------------------------------- ### initing_database Source: https://python.docs.hex-rays.com/_sources/ida_kernwin/index.rst.txt Database initialization has started. This event is called for both new and old databases. ```APIDOC ## initing_database() -> None ### Description Database initialization has started. See also ui_database_inited. This event is called for both new and old databases. ### Returns void ``` -------------------------------- ### init.IDAPythonHelp Source: https://python.docs.hex-rays.com/_sources/init/index.rst.txt Class for providing help, inheriting from pydoc.Helper. ```APIDOC ## init.IDAPythonHelp ### Description Class for providing help, inheriting from pydoc.Helper. ### Methods - **help(*args)** ``` -------------------------------- ### apply_startup_sig Source: https://python.docs.hex-rays.com/_sources/ida_funcs/index.rst.txt Applies a startup signature file to a given address, typically the start of a module. ```APIDOC ## apply_startup_sig ### Description Apply a startup signature file to the specified address. ### Signature `apply_startup_sig(ea: ida_idaapi.ea_t, startup: str) -> bool` ### Parameters * **ea** (ida_idaapi.ea_t) - address to apply the signature to; usually idainfo::start_ea * **startup** (str) - the name of the signature file without path and extension ### Returns True if successfully applied the signature, False otherwise. ``` -------------------------------- ### ida_bytes.chunk_start Source: https://python.docs.hex-rays.com/ida_bytes/index.html Gets the start address of the contiguous block containing the given address. ```APIDOC ## Function chunk_start ### Description Gets the starting address of the contiguous memory block that contains the specified address. ### Method Signature `chunk_start(ea: ida_idaapi.ea_t) -> ida_idaapi.ea_t` ### Parameters - **ea** (ida_idaapi.ea_t): The address within the program. ### Returns The starting address of the contiguous block containing `ea`, or `BADADDR` if `ea` does not belong to the program. ``` -------------------------------- ### ready_to_run Source: https://python.docs.hex-rays.com/_sources/ida_kernwin/index.rst.txt Callback function executed when all UI elements have been initialized. Automatic plugins can hook to this event to perform their tasks. ```APIDOC ## ready_to_run() -> None ### Description all UI elements have been initialized. Automatic plugins may hook to this event to perform their tasks. ### Returns void ``` -------------------------------- ### frame_off_args Source: https://python.docs.hex-rays.com/_sources/ida_frame/index.rst.txt Gets the starting address of the arguments section within the function frame. ```APIDOC ## frame_off_args ### Description Get starting address of arguments section. ### Parameters - **pfn** (func_t const *) - Pointer to the function structure. ### Returns - **ida_idaapi.ea_t** - Starting address of arguments section ``` -------------------------------- ### init.IDAPythonHelpPrompter Source: https://python.docs.hex-rays.com/_sources/init/index.rst.txt Helper class for prompting help. ```APIDOC ## init.IDAPythonHelpPrompter ### Description Helper class for prompting help. ### Methods - **readline()** ``` -------------------------------- ### Get Previous Function Chunk Source: https://python.docs.hex-rays.com/idc/index.html Retrieves the starting address of the previous function chunk. ```APIDOC ## idc.get_prev_fchunk(_ea_) ### Description Get previous function chunk. ### Parameters - **ea** (any address) - Any address. ### Returns - The starting address of the function chunk or BADADDR. NOTE: This function enumerates all chunks of all functions in the database. ``` -------------------------------- ### Set Node Info Example (IDA Kernwin) Source: https://python.docs.hex-rays.com/ida_kernwin/index.html Demonstrates how to set properties for a specific node in a graph view, such as background color. Requires an instance of CustomIDAMemo and idaapi.node_info_t. ```python inst = … p = idaapi.node_info_t() p.bg_color = 0x00ff0000 inst.SetNodeInfo(1, p, idaapi.NIF_BG_COLOR) ``` -------------------------------- ### Get Next Function Chunk Source: https://python.docs.hex-rays.com/idc/index.html Retrieves the starting address of the next function chunk. ```APIDOC ## idc.get_next_fchunk(_ea_) ### Description Get next function chunk. ### Parameters - **ea** (any address) - Any address. ### Returns - The starting address of the next function chunk or BADADDR. NOTE: This function enumerates all chunks of all functions in the database. ``` -------------------------------- ### ida_kernwin.pyscv_init Source: https://python.docs.hex-rays.com/ida_kernwin/index.html Initializes a simple custom viewer. ```APIDOC ## ida_kernwin.pyscv_init(_py_link: PyObject *_, _title: str_) -> PyObject * ### Description Initializes a simple custom viewer. ``` -------------------------------- ### read_selection_start Source: https://python.docs.hex-rays.com/_sources/idc/index.rst.txt Gets the starting linear address of the currently selected range in the disassembly view. ```APIDOC ## read_selection_start() ### Description Get start address of the selected range. ### Returns * BADADDR - the user has not selected an range ``` -------------------------------- ### frame_off_lvars Source: https://python.docs.hex-rays.com/_sources/ida_frame/index.rst.txt Gets the starting address of the local variables section within the function frame. ```APIDOC ## frame_off_lvars ### Description Get start address of local variables section. ### Parameters - **pfn** (func_t const *) - Pointer to the function structure. ### Returns - **ida_idaapi.ea_t** - Start address of local variables section ``` -------------------------------- ### desktop_applied Source: https://python.docs.hex-rays.com/_sources/ida_kernwin/index.rst.txt A desktop has been applied. ```APIDOC ## desktop_applied(name: str, from_idb: bool, type: int) -> None ### Description A desktop has been applied. ### Parameters * **name** (const char *) - the desktop name * **from_idb** (bool) - the desktop was stored in the IDB (false if it comes from the registry) * **type** (int) - the desktop type (1-disassembly, 2-debugger, 3-merge) ### Returns void ``` -------------------------------- ### frame_off_savregs Source: https://python.docs.hex-rays.com/_sources/ida_frame/index.rst.txt Gets the starting address of the saved registers section within the function frame. ```APIDOC ## frame_off_savregs ### Description Get starting address of saved registers section. ### Parameters - **pfn** (func_t const *) - Pointer to the function structure. ### Returns - **ida_idaapi.ea_t** - Starting address of saved registers section ``` -------------------------------- ### install_hexrays_callback(callback) Source: https://python.docs.hex-rays.com/_sources/ida_hexrays/index.rst.txt Installs a callback handler for decompiler events. ```APIDOC ## install_hexrays_callback(callback) ### Description Install handler for decompiler events. ### Parameters - **callback** (any) - The handler function to install. ### Returns - `false` if the installation failed. ``` -------------------------------- ### frame_off_retaddr Source: https://python.docs.hex-rays.com/_sources/ida_frame/index.rst.txt Gets the starting address of the return address section within the function frame. ```APIDOC ## frame_off_retaddr ### Description Get starting address of return address section. ### Parameters - **pfn** (func_t const *) - Pointer to the function structure. ### Returns - **ida_idaapi.ea_t** - Starting address of return address section ``` -------------------------------- ### Configuration and Options Source: https://python.docs.hex-rays.com/_sources/ida_idp/index.rst.txt Callbacks for setting processor-specific options. ```APIDOC ## ev_set_idp_options ### Description Set IDP-specific configuration option. Also see set_options_t in config.hpp. ### Parameters - **keyword** (str) - The option keyword. - **value_type** (int) - The type of the value. - **value** (void const *) - Pointer to the value. - **idb_loaded** (bool) - True if the ev_oldfile/ev_newfile events have been generated. ### Returns - int: 1: ok, 0: not implemented, -1: error (and message in errbuf). ``` ```APIDOC ## ev_set_proc_options ### Description Called if the user specified an option string in the command line: -p:. Can be used for setting a processor subtype. Also called if option string is passed to set_processor_type() and IDC's SetProcessorType(). ### Parameters - **options** (str) - The processor options string. - **confidence** (int) - 0: loader's suggestion, 1: user's decision. ### Returns - int: <0: if bad option string. ``` -------------------------------- ### ida_hexrays.install_hexrays_callback Source: https://python.docs.hex-rays.com/ida_hexrays/index.html Installs a handler for decompiler events. ```APIDOC ## ida_hexrays.install_hexrays_callback ### Description Install handler for decompiler events. ### Parameters * **callback** - handler to install ### Returns * `false` if failed ``` -------------------------------- ### Privileged Range Settings Source: https://python.docs.hex-rays.com/ida_ida/index.html Functions to get and set the start and end addresses of the privileged range. ```APIDOC ## ida_ida.inf_get_privrange_start_ea ### Description Retrieves the start address of the privileged range. ### Method ida_ida.inf_get_privrange_start_ea ### Returns - ida_idaapi.ea_t - The start address of the privileged range. ``` ```APIDOC ## ida_ida.inf_set_privrange_start_ea ### Description Sets the start address of the privileged range. ### Method ida_ida.inf_set_privrange_start_ea ### Parameters - **__v** (ida_idaapi.ea_t) - The start address to set. ### Returns - bool - True if successful, False otherwise. ``` ```APIDOC ## ida_ida.inf_get_privrange_end_ea ### Description Retrieves the end address of the privileged range. ### Method ida_ida.inf_get_privrange_end_ea ### Returns - ida_idaapi.ea_t - The end address of the privileged range. ``` ```APIDOC ## ida_ida.inf_set_privrange_end_ea ### Description Sets the end address of the privileged range. ### Method ida_ida.inf_set_privrange_end_ea ### Parameters - **__v** (ida_idaapi.ea_t) - The end address to set. ### Returns - bool - True if successful, False otherwise. ``` -------------------------------- ### ida_kernwin.UI_Hooks.idcstart Source: https://python.docs.hex-rays.com/ida_kernwin/index.html Called to indicate the start of IDC engine work. ```APIDOC ## ida_kernwin.UI_Hooks.idcstart ### Description Start of IDC engine work. ### Returns * (void) ``` -------------------------------- ### Private Range Functions Source: https://python.docs.hex-rays.com/ida_ida/index.html Functions to get and set the private range start and end addresses. ```APIDOC ## inf_get_privrange_start_ea ### Description Gets the start address of the private range. ### Method GET ### Endpoint /inf/privrange/start ### Response #### Success Response (200) - **return_value** (ida_idaapi.ea_t) - The start address of the private range. ``` ```APIDOC ## inf_set_privrange_start_ea ### Description Sets the start address of the private range. ### Method POST ### Endpoint /inf/privrange/start ### Parameters #### Request Body - **ea** (ida_idaapi.ea_t) - Required - The start address to set. ### Response #### Success Response (200) - **return_value** (bool) - True if the operation was successful, false otherwise. ``` ```APIDOC ## inf_get_privrange_end_ea ### Description Gets the end address of the private range. ### Method GET ### Endpoint /inf/privrange/end ### Response #### Success Response (200) - **return_value** (ida_idaapi.ea_t) - The end address of the private range. ``` ```APIDOC ## inf_set_privrange_end_ea ### Description Sets the end address of the private range. ### Method POST ### Endpoint /inf/privrange/end ### Parameters #### Request Body - **ea** (ida_idaapi.ea_t) - Required - The end address to set. ### Response #### Success Response (200) - **return_value** (bool) - True if the operation was successful, false otherwise. ``` ```APIDOC ## inf_set_privrange ### Description Sets the private range. ### Method POST ### Endpoint /inf/privrange ### Parameters #### Request Body - **start_ea** (ida_idaapi.ea_t) - Required - The start address of the private range. - **end_ea** (ida_idaapi.ea_t) - Required - The end address of the private range. ### Response #### Success Response (200) - **return_value** (bool) - True if the operation was successful, false otherwise. ``` ```APIDOC ## inf_get_privrange ### Description Gets the private range. ### Method GET ### Endpoint /inf/privrange ### Response #### Success Response (200) - **return_value** (range_t) - The private range object. ``` -------------------------------- ### ev_get_autocmt Source: https://python.docs.hex-rays.com/_sources/ida_idp/index.rst.txt Callback to get a dynamic auto-comment for an instruction. This is invoked if auto-comments are enabled and the comment starts with '$!'. ```APIDOC ## ev_get_autocmt(insn: insn_t const *) -> PyObject * ### Description Callback: get dynamic auto comment. Will be called if the autocomments are enabled and the comment retrieved from ida.int starts with '$!'. 'insn' contains valid info. ### Parameters #### Path Parameters - **insn** (const insn_t*) - Required - The instruction. ### Returns - **1**: new comment has been generated - **0**: callback has not been handled. the buffer must not be changed in this case ``` -------------------------------- ### Set Multiple Nodes Info Example (IDA Kernwin) Source: https://python.docs.hex-rays.com/ida_kernwin/index.html Shows how to set properties for multiple nodes simultaneously in a graph view. This is useful for applying the same style to several nodes at once. ```python inst = … p = idaapi.node_info_t() p.bg_color = 0x00ff00ff inst.SetNodesInfos({0 : p, 1 : p, 2 : p}) ``` -------------------------------- ### next_chunk Source: https://python.docs.hex-rays.com/_sources/ida_bytes/index.rst.txt Gets the starting address of the next contiguous chunk of memory in the program. Returns BADADDR if no subsequent chunk exists. ```APIDOC ## next_chunk ### Description Get the first address of next contiguous chunk in the program. ### Parameters #### Path Parameters - **ea** (ida_idaapi.ea_t) - Required - The current address. ### Returns - **ida_idaapi.ea_t** - BADADDR if next chunk does not exist. ``` -------------------------------- ### Get Function Chunks Source: https://python.docs.hex-rays.com/_sources/idautils/index.rst.txt Retrieves a list of chunks (contiguous blocks of code/data) belonging to a specific function, identified by its start address. ```python Chunks(start) ``` -------------------------------- ### Setting Up String List Parameters Source: https://python.docs.hex-rays.com/_sources/idautils/index.rst.txt Configures the string list parameters, such as string types, minimum length, and encoding. Use this to customize which strings are included. ```python Strings().setup(strtypes=[ida_nalt.STRTYPE_C], minlen=5, only_7bit=True, ignore_instructions=False, display_only_existing_strings=False) ``` -------------------------------- ### next_head Source: https://python.docs.hex-rays.com/_sources/ida_bytes/index.rst.txt Gets the starting address of the next defined item. The search begins at 'ea' and excludes 'maxea'. Returns BADADDR if no such item exists. ```APIDOC ## next_head ### Description Get start of next defined item. ### Parameters #### Path Parameters - **ea** (ida_idaapi.ea_t) - Required - Begin search at this address. - **maxea** (ida_idaapi.ea_t) - Required - Not included in the search range. ### Returns - **ida_idaapi.ea_t** - BADADDR if none exists. ``` -------------------------------- ### ida_diskio.fopenWB Source: https://python.docs.hex-rays.com/ida_diskio/index.html Opens a file for writing binary. ```APIDOC ## fopenWB ### Description Opens a file for writing binary. ### Signature `fopenWB(_file: str) -> FILE *` ``` -------------------------------- ### create_desktop_widget Source: https://python.docs.hex-rays.com/_sources/ida_kernwin/index.rst.txt Create a widget, to be placed in the widget tree (at desktop-creation time). ```APIDOC ## create_desktop_widget(title: str, cfg: jobj_wrapper_t) -> PyObject * ### Description Create a widget, to be placed in the widget tree (at desktop-creation time). ### Parameters * **title** (const char *) * **cfg** (const jobj_t *) ### Returns TWidget * the created widget, or null ``` -------------------------------- ### ev_get_reg_info Source: https://python.docs.hex-rays.com/_sources/ida_idp/index.rst.txt Get register information by its name. example: "ah" returns: * main_regname="eax" * bitrange_t = { offset==8, nbits==8 }. This callback may be unimplemented if the register names are all present in processor_t::reg_names and they all have the same size. ```APIDOC ## ev_get_reg_info ### Description Get register information by its name. example: "ah" returns: * main_regname="eax" * bitrange_t = { offset==8, nbits==8 } This callback may be unimplemented if the register names are all present in processor_t::reg_names and they all have the same size. ### Parameters #### Path Parameters - **main_regname** (const char **) - out - **bitrange** (bitrange_t *) - out: position and size of the value within 'main_regname' (empty bitrange == whole register) - **regname** (const char *) - register name ### Returns - 1: ok - -1: failed (not found) - 0: unimplemented ``` -------------------------------- ### ida_loader.load_and_run_plugin(_name_, _arg_) Source: https://python.docs.hex-rays.com/ida_loader/index.html Loads and then runs a plugin. ```APIDOC ## ida_loader.load_and_run_plugin(_name_: str, _arg_: int) ### Description Load & run a plugin. ### Parameters #### Path Parameters - **name** (str) - Short plugin name without path and extension, or absolute path to the file name. - **arg** (int) - The code to pass to the plugin’s “run()” function. ### Returns boolean: True if the plugin was loaded and ran successfully, False otherwise. ``` -------------------------------- ### init.IDAPythonStdOut Source: https://python.docs.hex-rays.com/_sources/init/index.rst.txt Dummy file-like class that receives stdout and stderr. ```APIDOC ## init.IDAPythonStdOut ### Description Dummy file-like class that receives stdout and stderr. ### Attributes - **encoding** (string) - Value: 'UTF-8' ### Methods - **write(text)** - **flush()** - **isatty()** ``` -------------------------------- ### Get Address Range of Selection Source: https://python.docs.hex-rays.com/ida_kernwin/index.html Retrieves the address range (start and end EA) for the currently selected range in an IDA view. If no range is selected, it returns 0. For the last active window containing addresses, pass nullptr as the view argument. ```python start_ea, end_ea = ida_kernwin.read_range_selection(view) ``` -------------------------------- ### Get Functions in Range Source: https://python.docs.hex-rays.com/_sources/idautils/index.rst.txt Retrieves a list of function entry points within a specified address range. The last function starting before 'end' is included even if it extends beyond 'end'. Functions spanning multiple segments may be listed multiple times. ```python Functions(start=None, end=None) ``` -------------------------------- ### ida_kernwin.take_database_snapshot Source: https://python.docs.hex-rays.com/ida_kernwin/index.html Creates a snapshot of the current IDA Pro database. ```APIDOC ## ida_kernwin.take_database_snapshot ### Description Takes a snapshot of the current IDA Pro database. ### Parameters * **snapshot** (object) - The snapshot object to populate. ### Returns * (tuple) - A tuple containing a boolean indicating success and an error message string. ``` -------------------------------- ### Read User Selection in IDA View Source: https://python.docs.hex-rays.com/ida_kernwin/index.html Reads the current user selection from a given IDA view and stores the start and end points in provided twinpos_t objects. After retrieval, the 'at' property of these objects needs to be specialized by calling .place(view) to get the correct type based on the view. ```python p1 = ida_kernwin.twinpos_t() p2 = ida_kernwin.twinpos_t() view = ida_kernwin.get_current_viewer() ida_kernwin.read_selection(view, p1, p2) place0 = p1.place(view) place1 = p2.place(view) ``` -------------------------------- ### Get Item Reference Information Source: https://python.docs.hex-rays.com/_sources/ida_bytes/index.rst.txt Function to get reference information for an item. ```APIDOC ## get_item_refinfo ### Description Get reference information for an item. ### Parameters - **ri** (refinfo_t) - Structure to store reference information. - **ea** (ida_idaapi.ea_t) - The address of the item. - **n** (int) - Operand number. ### Returns - bool - True if successful, False otherwise. ``` -------------------------------- ### choose_til Source: https://python.docs.hex-rays.com/_sources/ida_kernwin/index.rst.txt Opens a dialog to choose a type library. Returns true if a type library was selected, false otherwise. ```APIDOC ## choose_til ### Description Choose a type library (ui_choose, chtype_idatil). ### Returns True: 'buf' was filled with the name of the selected til False: otherwise ``` -------------------------------- ### setup_selector Source: https://python.docs.hex-rays.com/_sources/ida_segment/index.rst.txt Allocates a selector for a segment if necessary. This should be called before add_segm_ex(). ```APIDOC ## setup_selector ### Description Allocate a selector for a segment if necessary. You must call this function before calling add_segm_ex(). add_segm() calls this function itself, so you don't need to allocate a selector. This function will allocate a selector if 'segbase' requires more than 16 bits and the current processor is IBM PC. Otherwise it will return the segbase value. ### Signature ```python setup_selector(segbase: ida_idaapi.ea_t) -> sel_t ``` ### Parameters * **segbase** (ida_idaapi.ea_t) - A new segment base paragraph. ### Returns * **sel_t** - The allocated selector number. ``` -------------------------------- ### Get Import Module Name Source: https://python.docs.hex-rays.com/ida_nalt/index.html Function to get the name of an imported module given its index. ```APIDOC ## ida_nalt.get_import_module_name(mod_index: int) ### Description Returns the name of an imported module given its index. ### Method GET ### Endpoint /ida_nalt/import_module_name ### Parameters #### Query Parameters - **mod_index** (int) - Required - The module index. ### Response #### Success Response (200) - **return_value** (str or None) - The module name or None if not found. ``` -------------------------------- ### finish_populating_widget_popup Source: https://python.docs.hex-rays.com/_sources/ida_kernwin/index.rst.txt IDA is about to be done populating the context menu for a widget. This is your chance to attach_action_to_popup(). ```APIDOC ## finish_populating_widget_popup(widget: TWidget *, popup_handle: TPopupMenu *, ctx: action_ctx_base_t = None) -> None ### Description IDA is about to be done populating the context menu for a widget. This is your chance to attach_action_to_popup(). ### Parameters * **widget** (TWidget *) * **popup_handle** (TPopupMenu *) * **ctx** (action_ctx_base_t = None) ### Returns void ``` -------------------------------- ### Create Graph Groups Example (IDA Kernwin) Source: https://python.docs.hex-rays.com/ida_kernwin/index.html Illustrates how to create groups of nodes within a graph view. Each group can have associated text, and the operation can be animated. ```python inst.CreateGroups({ "nodes" : [0, 1, 2], "text" : "Group 1" }) ``` -------------------------------- ### ida_diskio.fopenA Source: https://python.docs.hex-rays.com/ida_diskio/index.html Opens a file for appending. ```APIDOC ## fopenA ### Description Opens a file for appending. ### Signature `fopenA(_file: str) -> FILE *` ``` -------------------------------- ### ida_funcs.set_func_start Source: https://python.docs.hex-rays.com/ida_funcs/index.html Moves the start address of a function chunk. This operation does not change the function's start and end addresses. ```APIDOC ## ida_funcs.set_func_start ### Description Move function chunk start address. ### Parameters * **ea** – any address in the function * **newstart** – new end address of the function ### Returns Function move result codes ### Result Codes * **ida_funcs.MOVE_FUNC_OK** – ok * **ida_funcs.MOVE_FUNC_NOCODE** – no instruction at ‘newstart’ * **ida_funcs.MOVE_FUNC_BADSTART** – bad new start address * **ida_funcs.MOVE_FUNC_NOFUNC** – no function at ‘ea’ * **ida_funcs.MOVE_FUNC_REFUSED** – a plugin refused the action ``` -------------------------------- ### Get String List Quantity Source: https://python.docs.hex-rays.com/_sources/ida_strlist/index.rst.txt Gets the number of elements in the string list. The list will be loaded from the database or built from scratch if not already available. ```APIDOC ## get_strlist_qty ### Description Get number of elements in the string list. The list will be loaded from the database (if saved) or built from scratch. ### Function Signature `get_strlist_qty() -> int` ``` -------------------------------- ### NW_INITIDA Source: https://python.docs.hex-rays.com/_sources/ida_idaapi/index.rst.txt Notification constant for when IDA starts. ```APIDOC ## NW_INITIDA ### Description Notify when the IDA starts. Its callback is of the form: def notify_when_callback(nw_code) ### Value 4 ``` -------------------------------- ### del_sreg_range Source: https://python.docs.hex-rays.com/ida_segregs/index.html Deletes a segment register range starting at a specified address. The preceding range expands to fill the gap. Ranges at the start of a segment cannot be deleted. ```APIDOC ## del_sreg_range ### Description Delete segment register range started at ea. When a segment register range is deleted, the previous range is extended to cover the empty space. The segment register range at the beginning of a segment cannot be deleted. ### Signature `del_sreg_range(→ bool)` ``` -------------------------------- ### idc.byte_value(_F_) Source: https://python.docs.hex-rays.com/idc/index.html Get byte value from flags. Get value of byte provided that the byte is initialized. This macro works ok only for 8-bit byte machines. ```APIDOC ## idc.byte_value(_F_) ### Description Get byte value from flags. Get value of byte provided that the byte is initialized. This macro works ok only for 8-bit byte machines. ### Parameters * **_F_** (int) - The flag to get the byte value from. ``` -------------------------------- ### init.print_banner Source: https://python.docs.hex-rays.com/_sources/init/index.rst.txt Prints the IDA Python banner. ```APIDOC ## init.print_banner ### Description Prints the IDA Python banner. ### Method GET ### Endpoint /init/print_banner ``` -------------------------------- ### buffer Source: https://python.docs.hex-rays.com/_sources/ida_idd/index.rst.txt Creates a string buffer. The returned value (r) will be a byref object. Use r.value to get the contents and r.size to get the buffer's size. ```APIDOC ## buffer ### Description Creates a string buffer. The returned value (r) will be a byref object. Use r.value to get the contents and r.size to get the buffer's size. ### Method `staticmethod` ### Parameters - **str** (string) - Optional - The initial string content for the buffer. - **size** (integer) - Optional - The size of the buffer. Defaults to 0. - **fill** (string) - Optional - The character to fill the buffer with if size is specified and str is not. Defaults to '\x00'. ``` -------------------------------- ### ida_diskio.choose_ioport_device2 Source: https://python.docs.hex-rays.com/ida_diskio/index.html Chooses an I/O port device and parser. ```APIDOC ## choose_ioport_device2 ### Description Chooses an I/O port device and parser. ### Parameters * **__device** – device name * **file** – file path * **parse_params** – parser callback object ### Returns True on success, false otherwise. ### Signature `choose_ioport_device2(__device: str, _file: str, _parse_params: choose_ioport_parser_t) -> bool` ``` -------------------------------- ### value_repr_t.get_vtype Source: https://python.docs.hex-rays.com/_sources/ida_typeinf/index.rst.txt Gets the value type. ```APIDOC ## value_repr_t.get_vtype ### Description Gets the value type. ### Method Signature `get_vtype() -> uint64` ``` -------------------------------- ### get_modifiers Source: https://python.docs.hex-rays.com/_sources/ida_typeinf/index.rst.txt Get the type modifiers. ```APIDOC ## get_modifiers ### Description Get the type modifiers. ### Method `get_modifiers() -> type_t` ```