reusable_side_panels_gitbook
::: info ExploitContext Overview Use ExploitContext to centralize configuration, session, and metadata across stages of your exploit.
from_args()builds it from CLI argumentsfrom_file()restores saved statectx.web_url()/ctx.api_url()return usable base URLsctx.save()persists current state to diskIdeal for chaining exploit phases cleanly :::
::: tip Using .env for Config If you prefer not to pass long CLI arguments, load variables from a .env file using dotenv_values().
Keys like
TARGET_IP,PROXY,LISTENING_PORTCan be parsed and cast into types manually
Combine with defaults for resilience
Use
parse_config()to simplify validation :::
::: note Logging Strategy Build a minimal logger early in your PoC for audit trails and debugging:
Log to both console and
logs/poc.logUse severity levels: DEBUG, INFO, ERROR
Include timestamps and exploit stage info
Optional: support JSON output for replayability :::
::: example IdentityGenerator Integration Use a reusable identity provider to generate unique accounts across labs:
Randomized usernames, emails, and passwords
Optional: enforce complexity (
low,medium,high)Can include phone, address, UUID, etc.
Save to
user.jsonfor later reuse :::
Last updated