Skip to main content

Conf

The global Conf object is an instance of ConfigurationManager that manages all angr management settings. It is automatically created and loaded from the configuration file.
from angrmanagement.config import Conf

# Access configuration values
font = Conf.disasm_font
color = Conf.disasm_view_background_color

# Modify configuration
Conf.disasm_font = QFont("Courier New", 12)

ConfigurationManager

The ConfigurationManager class manages UI configuration with save/load functionality.

Constructor

ConfigurationManager(entries: dict[str, ConfigurationEntry] | None = None)
entries
dict[str, ConfigurationEntry]
Dictionary of configuration entries. If None, loads default entries.

Font Properties

disasm_font
QFont
Font used in disassembly view
disasm_font_metrics
QFontMetricsF
Font metrics for disassembly font (read-only, cached)
disasm_font_height
float
Height of disassembly font (read-only, cached)
disasm_font_width
float
Width of a single character in disassembly font (read-only, cached)
disasm_font_ascent
float
Ascent of disassembly font (read-only, cached)
symexec_font
QFont
Font used in symbolic execution view
symexec_font_metrics
QFontMetricsF
Font metrics for symbolic execution font (read-only, cached)
symexec_font_height
float
Height of symbolic execution font (read-only, cached)
symexec_font_width
float
Width of symbolic execution font (read-only, cached)
symexec_font_ascent
float
Ascent of symbolic execution font (read-only, cached)
code_font
QFont
Font used in pseudocode/decompiler view
code_font_metrics
QFontMetricsF
Font metrics for code font (read-only, cached)
code_font_height
float
Height of code font (read-only, cached)
code_font_width
float
Width of code font (read-only, cached)
code_font_ascent
float
Ascent of code font (read-only, cached)
ui_default_font
QFont
Default font for UI elements
tabular_view_font
QFont
Font used in tabular views

Theme Properties

theme_name
str
default:"Light"
Name of the current theme
base_theme_name
str
default:"Light"
Name of the base theme

Disassembly View Colors

disasm_view_background_color
QColor
Background color for disassembly view
disasm_view_operand_color
QColor
Color for instruction operands
disasm_view_operand_constant_color
QColor
Color for constant operands
disasm_view_variable_label_color
QColor
Color for variable labels
disasm_view_operand_highlight_color
QColor
Highlight color for operands
disasm_view_operand_select_color
QColor
Selection color for operands
disasm_view_function_color
QColor
Color for function references
disasm_view_string_color
QColor
Color for string literals
disasm_view_comment_color
QColor
Color for comments
disasm_view_label_color
QColor
Color for labels
disasm_view_node_background_color
QColor
Background color for graph nodes
disasm_view_node_border_color
QColor
Border color for graph nodes
disasm_view_selected_node_border_color
QColor
Border color for selected nodes
disasm_view_node_instruction_selected_background_color
QColor
Background color for selected instructions

Edge Colors

disasm_view_back_edge_color
QColor
Color for back edges (loops)
disasm_view_true_edge_color
QColor
Color for true branch edges
disasm_view_false_edge_color
QColor
Color for false branch edges
disasm_view_direct_jump_edge_color
QColor
Color for direct jump edges
disasm_view_exception_edge_color
QColor
Color for exception edges

Pseudocode Colors

pseudocode_comment_color
QColor
Color for comments in pseudocode
pseudocode_function_color
QColor
Color for function names in pseudocode
pseudocode_library_function_color
QColor
Color for library function calls
pseudocode_quotation_color
QColor
Color for string literals
pseudocode_keyword_color
QColor
Color for language keywords
pseudocode_types_color
QColor
Color for type names
pseudocode_variable_color
QColor
Color for local variables
pseudocode_global_variable_color
QColor
Color for global variables
pseudocode_label_color
QColor
Color for labels
pseudocode_highlight_color
QColor
Highlight color for pseudocode

Hex View Colors

hex_view_selection_color
QColor
Selection color in hex view
hex_view_data_color
QColor
Color for data bytes
hex_view_string_color
QColor
Color for string bytes
hex_view_instruction_color
QColor
Color for instruction bytes

Function Table Colors

function_table_color
QColor
Default color for functions
function_table_syscall_color
QColor
Color for syscall functions
function_table_plt_color
QColor
Color for PLT functions
function_table_simprocedure_color
QColor
Color for SimProcedures
function_table_alignment_color
QColor
Color for alignment functions
function_table_signature_bg_color
QColor
Background color for functions with signatures

Plugin Settings

plugin_search_path
str
Search path for plugins (colon-separated)
enabled_plugins
str
Comma-separated list of enabled plugin names

Network Settings

http_proxy
str
HTTP proxy URL
https_proxy
str
HTTPS proxy URL

LLM Settings

llm_model
str
LLM model identifier (e.g., “gpt-4”)
llm_api_key
str
API key for LLM service
llm_api_base
str
Base URL for LLM API
llm_preload_callees
bool
default:"False"
Whether to preload callee information for LLM context
llm_auto_rename_variables
bool
default:"False"
Automatically rename variables using LLM suggestions
llm_auto_rename_function
bool
default:"False"
Automatically rename functions using LLM suggestions
llm_auto_retype_variables
bool
default:"False"
Automatically retype variables using LLM suggestions
llm_auto_summarize
bool
default:"False"
Automatically generate function summaries using LLM

Other Settings

enabled_tabs
str
Comma-separated list of enabled tab names
recent_files
list[str]
List of recently opened files
log_timestamp_format
str
default:"%X"
Format string for log timestamps
flirt_signatures_root
str
Root directory for FLIRT signatures
library_docs_root
str
Root directory for library documentation
use_daemon
bool
default:"False"
Whether to use daemon mode

Methods

init_font_config

init_font_config() -> None
Initialize font configuration from Qt application defaults.

recent_file

recent_file(file_path: str) -> None
Add a file to the recent files list.
file_path
str
required
Path to the file

connect

connect(key: str, func: Callable[[Any], None], init: bool) -> None
Connect a callback to be notified when a configuration value changes.
key
str
required
Configuration key to watch
func
Callable[[Any], None]
required
Callback function that receives the new value
init
bool
required
If True, immediately call func with the current value

disconnect

disconnect(key: str, func: Callable[[Any], None]) -> None
Disconnect a callback from configuration change notifications.
key
str
required
Configuration key
func
Callable[[Any], None]
required
Callback function to disconnect

parse_file

@classmethod
parse_file(cls, path: str, ignore_unknown_entries: bool = False) -> ConfigurationManager
Load configuration from a TOML file.
path
str
required
Path to the configuration file
ignore_unknown_entries
bool
default:"False"
Whether to ignore unknown configuration entries
return
ConfigurationManager
The loaded configuration manager

save_file

save_file(path: str) -> None
Save configuration to a TOML file.
path
str
required
Path to save the configuration file

reinterpet

reinterpet() -> None
Reinterpret configuration entries. Useful after loading plugins that add new configuration options.

attempt_importing_initial_config

attempt_importing_initial_config() -> bool
Look for and import initial configuration file (am_initial_config).
return
bool
True if successfully imported, False otherwise

Utility Functions

save_config

from angrmanagement.config import save_config

save_config()
Save the global configuration to disk.

Configuration File Location

The configuration file is automatically located in the platform-specific configuration directory:
  • Linux: ~/.config/angr-management/config.toml
  • macOS: ~/Library/Application Support/angr-management/config.toml
  • Windows: %APPDATA%/angr-management/config.toml

Example Usage

from angrmanagement.config import Conf, save_config
from PySide6.QtGui import QFont, QColor

# Read configuration
print(f"Current font: {Conf.disasm_font.family()}")
print(f"Background color: {Conf.disasm_view_background_color.name()}")

# Modify configuration
Conf.disasm_font = QFont("Courier New", 12)
Conf.disasm_view_background_color = QColor("#2b2b2b")

# Listen for changes
def on_font_changed(new_font):
    print(f"Font changed to: {new_font.family()}")

Conf.connect("disasm_font", on_font_changed, init=True)

# Save changes
save_config()

Build docs developers (and LLMs) love