idapython
IDA Pro Python scripting for reverse engineering. Use when writing IDAPython scripts, analyzing binaries, working with IDA's API for disassembly, decompilation (Hex-Rays), type systems, cross-references, functions, segments, or any IDA database manipulation. Covers ida_* modules (50+), idautils iter
v2026.11.12-13e480c4 instalações+4 em 7 dias13,5 mil EstrelasMITsincronizado há 13 horas
Instalar
Ainda não tem a CLI da NotHoly? Instale primeiro.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install mrexodia/idapythonGrava em ~/.notholy/skills depois de conferir a assinatura e o SHA-256.
AssinaturaAssinado, ed25519
Pacotec6d5d173…c5eb8264
c6d5d173e537…671fc5eb8264105 arquivos · 460.5 KBVarreduraAlto10 achados
- injection.system_promptdocs/ida_ida.rst:1953
- injection.no_confirmationdocs/ida_idd.rst:971
- injection.no_confirmationdocs/ida_idd.rst:1008
Fontegithub.com/mrexodia/ida-pro-mcp/tree/main/skills/idapython@13e480c
Este item ainda não foi escrito no seu idioma, então aparece em English.
Nesta página
Use modern ida_* modules. Avoid legacy idc module.
Module Router
| Task | Module | Key Items |
|---|---|---|
| Bytes/memory | ida_bytes |
get_bytes, patch_bytes, get_flags, create_* |
| Functions | ida_funcs |
func_t, get_func, add_func, get_func_name |
| Names | ida_name |
set_name, get_name, demangle_name |
| Types | ida_typeinf |
tinfo_t, apply_tinfo, parse_decl |
| Decompiler | ida_hexrays |
decompile, cfunc_t, lvar_t, ctree visitor |
| Segments | ida_segment |
segment_t, getseg, add_segm |
| Xrefs | ida_xref |
xrefblk_t, add_cref, add_dref |
| Instructions | ida_ua |
insn_t, op_t, decode_insn |
| Stack frames | ida_frame |
get_frame, define_stkvar |
| Iteration | idautils |
Functions(), Heads(), XrefsTo(), Strings() |
| UI/dialogs | ida_kernwin |
msg, ask_*, jumpto, Choose |
| Database info | ida_ida |
inf_get_*, inf_is_64bit() |
| Analysis | ida_auto |
auto_wait, plan_and_wait |
| Flow graphs | ida_gdl |
FlowChart, BasicBlock |
| Register tracking | ida_regfinder |
find_reg_value, reg_value_info_t |
Core Patterns
Iterate functions
for ea in idautils.Functions():
name = ida_funcs.get_func_name(ea)
func = ida_funcs.get_func(ea)Iterate instructions in function
for head in idautils.FuncItems(func_ea):
insn = ida_ua.insn_t()
if ida_ua.decode_insn(insn, head):
print(f"{head:#x}: {insn.itype}")Cross-references
for xref in idautils.XrefsTo(ea):
print(f"{xref.frm:#x} -> {xref.to:#x} type={xref.type}")Read/write bytes
data = ida_bytes.get_bytes(ea, size)
ida_bytes.patch_bytes(ea, b"\x90\x90")Names
name = ida_name.get_name(ea)
ida_name.set_name(ea, "new_name", ida_name.SN_NOCHECK)Decompile function
cfunc = ida_hexrays.decompile(ea)
if cfunc:
print(cfunc) # pseudocode
for lvar in cfunc.lvars:
print(f"{lvar.name}: {lvar.type()}")Walk ctree (decompiled AST)
class MyVisitor(ida_hexrays.ctree_visitor_t):
def visit_expr(self, e):
if e.op == ida_hexrays.cot_call:
print(f"Call at {e.ea:#x}")
return 0
cfunc = ida_hexrays.decompile(ea)
MyVisitor().apply_to(cfunc.body, None)Apply type
tif = ida_typeinf.tinfo_t()
if ida_typeinf.parse_decl(tif, None, "int (*)(char *, int)", 0):
ida_typeinf.apply_tinfo(ea, tif, ida_typeinf.TINFO_DEFINITE)Create structure
udt = ida_typeinf.udt_type_data_t()
m = ida_typeinf.udm_t()
m.name = "field1"
m.type = ida_typeinf.tinfo_t(ida_typeinf.BTF_INT32)
m.offset = 0
m.size = 4
udt.push_back(m)
tif = ida_typeinf.tinfo_t()
tif.create_udt(udt, ida_typeinf.BTF_STRUCT)
tif.set_named_type(ida_typeinf.get_idati(), "MyStruct")Strings list
for s in idautils.Strings():
print(f"{s.ea:#x}: {str(s)}")Wait for analysis
ida_auto.auto_wait() # Block until autoanalysis completesKey Constants
| Constant | Value/Use |
|---|---|
BADADDR |
Invalid address sentinel |
ida_name.SN_NOCHECK |
Skip name validation |
ida_typeinf.TINFO_DEFINITE |
Force type application |
o_reg, o_mem, o_imm, o_displ, o_near |
Operand types |
dt_byte, dt_word, dt_dword, dt_qword |
Data types |
fl_CF, fl_CN, fl_JF, fl_JN, fl_F |
Code xref types |
dr_R, dr_W, dr_O |
Data xref types |
Critical Rules
- NEVER convert hex/decimal manually — use
int_convertMCP tool - Wait for analysis: Call
ida_auto.auto_wait()before reading results - Thread safety: IDA SDK calls must run on main thread (use
@idasync) - 64-bit addresses: Always assume
ea_tcan be 64-bit
Anti-Patterns
| Avoid | Do Instead |
|---|---|
idc.* functions |
Use ida_* modules |
| Hardcoded addresses | Use names, patterns, or xrefs |
| Manual hex conversion | Use int_convert tool |
| Blocking main thread | Use execute_sync() for long ops |
| Guessing at types | Derive from disassembly/decompilation |
Detailed API Reference
For comprehensive documentation on any module, read docs/<module>.md:
- High-use:
ida_bytes,ida_funcs,ida_hexrays,ida_typeinf,ida_name,idautils - Medium-use:
ida_segment,ida_xref,ida_ua,ida_frame,ida_kernwin - Specialized:
ida_dbg(debugger),ida_nalt(netnode storage),ida_regfinder(register tracking)
Full RST sources from hex-rays.com available at docs/<module>.rst.
Arquivos desta versão
docs/1042.0 MB
- idaapi.md317 B
- idaapi.rst270 B
- ida_auto.md1.7 KB
- ida_auto.rst10.2 KB
- ida_bitrange.md652 B
- ida_bitrange.rst2.0 KB
- ida_bytes.md4.0 KB
- ida_bytes.rst93.1 KB
- ida_dbg.md3.8 KB
- ida_dbg.rst74.7 KB
- idadex.md2.0 KB
- idadex.rst3.9 KB
- ida_dirtree.md1.9 KB
- ida_dirtree.rst16.5 KB
- ida_diskio.md2.2 KB
- ida_diskio.rst7.0 KB
- ida_entry.md1.0 KB
- ida_entry.rst3.8 KB
- ida_expr.md3.5 KB
- ida_expr.rst19.2 KB
- ida_fixup.md2.8 KB
- ida_fixup.rst9.5 KB
- ida_fpro.md1.6 KB
- ida_fpro.rst3.5 KB
- ida_frame.md4.8 KB
- ida_frame.rst21.2 KB
- ida_funcs.md7.5 KB
- ida_funcs.rst33.0 KB
- ida_gdl.md1.5 KB
- ida_gdl.rst11.8 KB
- ida_graph.md2.0 KB
- ida_graph.rst41.0 KB
- ida_hexrays.md5.5 KB
- ida_hexrays.rst371.4 KB
- ida_idaapi.md1.3 KB
- ida_idaapi.rst14.4 KB
- ida_ida.md2.6 KB
- ida_ida.rst68.5 KB
- ida_idc.md381 B
- ida_idc.rst439 B
- ida_idd.md1.5 KB
- ida_idd.rst64.8 KB
- ida_idp.md1.4 KB
- ida_idp.rst133.1 KB
- ida_ieee.md1.0 KB
- ida_ieee.rst5.1 KB
- ida_kernwin.md2.0 KB
- ida_kernwin.rst228.2 KB
- ida_libfuncs.md966 B
- ida_libfuncs.rst3.0 KB
- ida_lines.md1.1 KB
- ida_lines.rst16.0 KB
- ida_loader.md3.5 KB
- ida_loader.rst21.2 KB
- ida_merge.md1.3 KB
- ida_mergemod.md740 B
- ida_mergemod.rst3.8 KB
- ida_merge.rst25.3 KB
- ida_moves.md2.7 KB
- ida_moves.rst7.4 KB
- ida_nalt.md9.3 KB
- ida_nalt.rst52.4 KB
- ida_name.md7.0 KB
- ida_name.rst27.9 KB
- ida_netnode.md1.1 KB
- ida_netnode.rst12.1 KB
- ida_offset.md996 B
- ida_offset.rst7.7 KB
- ida_problems.md1.2 KB
- ida_problems.rst4.1 KB
- ida_pro.md1.3 KB
- ida_pro.rst31.9 KB
- ida_range.md1.8 KB
- ida_range.rst10.5 KB
- ida_regfinder.md2.7 KB
- ida_regfinder.rst16.1 KB
- ida_registry.md1.7 KB
- ida_registry.rst6.0 KB
- ida_search.md1.4 KB
- ida_search.rst3.1 KB
- ida_segment.md4.9 KB
- ida_segment.rst37.9 KB
- ida_segregs.md1.8 KB
- ida_segregs.rst6.3 KB
- ida_srclang.md1.4 KB
- ida_srclang.rst4.2 KB
- ida_strlist.md1.0 KB
- ida_strlist.rst2.0 KB
- ida_tryblks.md1.4 KB
- ida_tryblks.rst7.4 KB
- ida_typeinf.md7.6 KB
- ida_typeinf.rst202.2 KB
- ida_ua.md2.2 KB
- ida_ua.rst43.6 KB
- ida_undo.md768 B
- ida_undo.rst1.2 KB
- idautils.md3.2 KB
- idautils.rst9.8 KB
- ida_xref.md1.9 KB
- ida_xref.rst15.0 KB
- idc.md10.8 KB
- idc.rst119.1 KB
- init.md752 B
- init.rst1.5 KB
- SKILL.md4.9 KB
Permissões
| Permissão | Declarada | Encontrada na varredura |
|---|---|---|
| Lê arquivos | Sim | Sim |
| Grava arquivos | Sim | Sim |
| Roda comandos no shell | Não | Não |
| Usa a rede | Sim | Sim |
| Usa conectores | Não | Não |
| Controla um navegador | Não | Não |
Achados da varredura
Revisado em 13 de nov. de 2026
- AltaPrompt injection · injection.system_promptdocs/ida_ida.rst:1953
- MédiaPrompt injection · injection.no_confirmationdocs/ida_idd.rst:971
- MédiaPrompt injection · injection.no_confirmationdocs/ida_idd.rst:1008
- MédiaPrompt injection · injection.no_confirmationdocs/ida_name.md:81
- MédiaPrompt injection · injection.no_confirmationdocs/ida_name.rst:399
- MédiaPrompt injection · injection.no_confirmationdocs/ida_segment.rst:1062
- MédiaPrompt injection · injection.no_confirmationdocs/ida_typeinf.rst:6963
- MédiaPrompt injection · injection.no_confirmationdocs/ida_typeinf.rst:7161
- MédiaPrompt injection · injection.no_confirmationdocs/ida_typeinf.rst:7282
- InfoLink · Links para domínios externos
Uma varredura limpa reduz o risco, mas não prova que o pacote é seguro. Leia o que você instala.
| Versão | Publicada em | Commit | SHA-256 | Assinatura | Mudança de permissão |
|---|---|---|---|---|---|
| v2026.11.12-13e480c | 13 de nov. de 2026 | 13e480c | c6d5d173 | Assinada | – |
Pergunte tudo o que o seu escopo permite.
Crie a conta, adicione créditos e faça a primeira pergunta no chat ou no terminal.
- 1/3
Crie a conta
Individual ou empresa. Dá para virar empresa depois sem perder saldo nem chaves.
Pessoa físicaEmpresa - 2/3
Adicione créditos
No cartão. Você paga por token, sem assinatura.
$5.00recarga mínima - 3/3
Pergunte
No chat, ou instale o CLI e rode notholy login no terminal.
$ notholy login