API Reference¶
Helpers¶
Shared helpers for binary parsing and value formatting.
- helpers.hex_addr(value)[source]¶
Format an integer as a hex address string, or return None.
- Parameters:
value (int | None)
- Return type:
str | None
- helpers.safe_str(value)[source]¶
Convert bytes / str / other to a plain string, or None.
- Parameters:
value (Any)
- Return type:
str | None
Tools¶
Info¶
Tool: get_binary_info — quick triage of a binary file.
Headers¶
Tool: get_binary_headers — detailed header fields for a binary.
Sections¶
Tool: get_binary_sections — list all sections with metadata.
Imports¶
Tool: get_binary_imports — imported functions grouped by library.
- tools.imports.get_binary_imports(file_path, limit=0)[source]¶
Imported functions, grouped by library.
For PE binaries imports are grouped by DLL. For ELF / Mach-O a flat list of imported function names is returned.
Set limit > 0 to cap the total number of entries returned.
- Parameters:
file_path (str)
limit (int)
- Return type:
dict
Exports¶
Tool: get_binary_exports — exported functions / symbols.
- tools.exports.get_binary_exports(file_path, limit=0)[source]¶
Exported functions / symbols.
For PE files with an export table, returns name, ordinal, address, and forwarded-function info. For ELF / Mach-O returns a list of exported symbol names.
Set limit > 0 to cap the number of entries returned.
- Parameters:
file_path (str)
limit (int)
- Return type:
dict
Libraries¶
Tool: get_binary_libraries — dynamic library dependencies.
Security¶
Tool: get_binary_security — security features and hardening.
- tools.security.get_binary_security(file_path)[source]¶
Security features and hardening of a binary.
PE: ASLR, DEP/NX, SEH, Control Flow Guard, code signing. ELF: NX, PIE, RELRO, stack canaries, FORTIFY_SOURCE. Mach-O: PIE, NX stack/heap, code signature, header flags.
- Parameters:
file_path (str)
- Return type:
dict