bring

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2026 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BringCommand

func BringCommand(con *client.Client) *cobra.Command

BringCommand returns the `aims bring <agent-id>` command. It reads the agent from the server and writes a per-agent context payload — inert key<TAB>value data, display fields sanitized — that the trusted bring() shell function (installed by `aims init`) consumes to make the current shell "about" that c2 agent. It takes the connect pre-run bindRunners attaches to online leaves.

func InitCommand

func InitCommand(con *client.Client) *cobra.Command

InitCommand returns the `aims init <bash|zsh|fish>` command. It emits the fixed, trusted shell integration — the bring()/leave() functions and helpers — to be sourced once from the operator's shell rc (`source <(aims init zsh)`). This half carries no agent data. It needs no server connection: a benign PreRunE keeps bindRunners from attaching the connect pre-run, so it runs fully offline.

func PromptCommand added in v0.3.0

func PromptCommand(con *client.Client) *cobra.Command

PromptCommand returns the hidden `aims prompt` command: the data source for the shell prompt integration installed by `aims init`. These are live, server-GLOBAL figures — the server version, the number of connected operators, and the running-scan count — that change independently of bring/leave, so the shell cannot bake them into $PROMPT and instead re-polls this command from a precmd hook. All three are fetched in one invocation so a poll costs a single teamserver connect.

In --terse mode it prints exactly one line, three tab-separated fields — scans<TAB>version<TAB> connected — which the zsh hook parses and renders in the right prompt. Every field is numeric or a dotted version (never agent-derived), so it is inert under prompt expansion. An empty field means "unavailable this poll": the shell keeps its last known value rather than flap the prompt. Run by hand (no flag) it prints a short human-readable server summary instead.

Unlike `init`, it needs a live connection — it does NOT opt out of the connect pre-run that bindRunners attaches, so the server is reached before RunE.

Types

This section is empty.

Directories

Path Synopsis
Package shell is the boundary between AIMS and the operator's interactive shell for the `bring` implant-context feature (see BRING.md).
Package shell is the boundary between AIMS and the operator's interactive shell for the `bring` implant-context feature (see BRING.md).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL