Skip to main content

Settings

R4t maintains persistent configuration in the Badger KV store. Use the set command to view and modify these settings.

The set Command

r4t set [flags]
Settings are mutually exclusive — set one value per invocation.

Flags

FlagTypeDescription
--domainstringDefault AD domain for all operations
--nsstringDefault DNS nameserver
--interfacestringDefault network interface (e.g., eth0, tun0)
--local-dbboolUse per-directory SQLite DB instead of global (true/false)
--debugboolEnable debug-level output (true/false)
--teeboolTee all output to a file (true/false)
--color-schemestringTerminal color scheme name
--statusPrint current settings to stdout

Individual Settings

Domain

The default domain is used when -d/--domain is not specified on the command line.
r4t set --domain corp.example.com
Stored as cfg:domain in Badger. Automatically detected from system DNS on first run but can be overridden at any time.

Nameserver

The nameserver is used for DNS-based discovery (LDAP server resolution, DC lookup, SRV records).
r4t set --ns 10.10.10.1
Stored as cfg:nameserver. Auto-detected on first run from system DNS or from DC discovery.

Network Interface

Sets the default network interface for operations that require binding to a specific interface (e.g., coercion listeners, poisoning).
r4t set --interface tun0
Stored as cfg:interface.

Local Database

By default R4t stores r4t.sqlite in ~/.local/share/r4t/db/. Enabling local DB mode places the SQLite file in the current working directory — useful for keeping engagement data isolated.
# Enable local DB (creates r4t.sqlite in current directory)
r4t set --local-db true

# Disable local DB (use global path)
r4t set --local-db false
Stored as cfg:local_db.
Note: Switching modes does not migrate data. You will start with a fresh database in the new location.

Debug Mode

Enables verbose debug-level logging to both the console and the log file.
r4t set --debug true
r4t set --debug false
Stored as cfg:debug.

Output Tee

When enabled, all terminal output is also written to a timestamped file in ~/.local/share/r4t/.
r4t set --tee true
r4t set --tee false
Stored as cfg:tee.

Color Scheme

R4t supports multiple color schemes for terminal output.
# Set a color scheme
r4t set --color-scheme cyberpunk

# List all available schemes
r4t set color list

# Preview a scheme with sample tables and severity levels
r4t set color show cyberpunk
Available schemes include: default, dark, light, cyberpunk, and others. Stored as cfg:color_scheme.

Viewing Current Settings

r4t set --status
Prints all current persistent settings including domain, nameserver, interface, local-db mode, debug mode, tee mode, and color scheme.

Proxy Settings

SOCKS5 proxy configuration is stored separately in Badger (cfg:proxy) and is set via the proxy command rather than set:
r4t proxy set --host 127.0.0.1 --port 1080
r4t proxy clear
When a proxy is configured, all protocol connections (LDAP, Kerberos, SMB, etc.) route through it. DNS resolution can optionally be forwarded through the proxy as well.

Settings Persistence

All settings are stored in the Badger KV store at ~/.local/share/r4t/db/ and persist across invocations. The store is encrypted with AES-256 using a hardware-derived key, so the settings file is not readable without R4t. Settings are loaded at startup before any command runs, so configured defaults apply automatically to every operation without re-specifying flags.