# elespike/burp-cph architecture

> Architecture diagram of the GitHub repository elespike/burp-cph, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/elespike/burp-cph
- Repository: https://github.com/elespike/burp-cph

## Overview

Custom Parameter Handler is a Burp Suite extension for configuring ordered, scoped HTTP-message transformations, including extracting dynamic values from issued requests, macros, or cached responses. Burp delivers messages and session-handling actions to the extension, which applies enabled tab rules and writes modifications back; users configure rules and inspect changes in the suite UI. The excerpts show the main dispatch and parts of message processing, while some wiring and persistence details are documented rather than sampled.

Main entry points: [`CustomParamHandler.py`](https://github.com/elespike/burp-cph/blob/master/CustomParamHandler.py) (Extension callbacks), [`CPH_Config.py`](https://github.com/elespike/burp-cph/blob/master/CPH_Config.py) (Main tab), [`tinyweb.py`](https://github.com/elespike/burp-cph/blob/master/tinyweb.py) (Interactive demo server), [`CPH_Help.py`](https://github.com/elespike/burp-cph/blob/master/CPH_Help.py) (Help content)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_burp_runtime["Burp runtime"]
  node_extension["Extension callbacks"]
end

subgraph group_configuration["Configuration UI"]
  node_main_tab["Main tab<br/>[CPH_Config.py]"]
  node_config_tabs["Rule tabs<br/>[CPH_Config.py]"]
  node_options_tab["Scope options<br/>[CPH_Config.py]"]
  node_emv["Modification viewer<br/>[CPH_Config.py]"]
end

subgraph group_message_processing["Message processing"]
  node_scope_filter["Scope filtering"]
  node_rule_engine["Regex replacement"]
  node_value_sources["Dynamic value sources"]
  node_request_issuer["Request issuer"]
  node_message_update["Message update"]
end

subgraph group_supporting_features["Persistence and demos"]
  node_config_persistence["Config persistence<br/>[CPH_Config.py]"]
  node_demo_server["Interactive demo server<br/>[tinyweb.py]"]
  node_help_content["Help content<br/>[CPH_Help.py]"]
end

node_burp_user(("Burp user"))
node_burp_suite(("Burp Suite"))
node_target_service(("HTTP target"))
node_config_file["JSON config file"]

node_burp_user -->|"configures"| node_main_tab
node_burp_user -->|"sends requests"| node_extension
node_burp_suite -->|"dispatches callbacks"| node_extension
node_extension -->|"creates"| node_main_tab
node_main_tab -->|"manages"| node_config_tabs
node_main_tab -->|"hosts"| node_options_tab
node_extension -->|"reads settings"| node_options_tab
node_extension -->|"checks messages"| node_scope_filter
node_scope_filter -->|"selects rules"| node_config_tabs
node_extension -->|"modifies messages"| node_rule_engine
node_rule_engine -->|"uses extracted values"| node_value_sources
node_extension -->|"issues configured request"| node_request_issuer
node_request_issuer -->|"sends HTTP request"| node_target_service
node_extension -->|"writes modified message"| node_message_update
node_extension -->|"records changes"| node_emv
node_burp_user -->|"saves or loads"| node_config_persistence
node_config_persistence -->|"reads or writes"| node_config_file
node_options_tab -.->|"starts or stops"| node_demo_server
node_main_tab -->|"shows guidance"| node_help_content
node_value_sources -->|"reads cached responses"| node_config_tabs
node_burp_suite -.->|"provides macro response"| node_value_sources

click node_extension "https://github.com/elespike/burp-cph/blob/master/CustomParamHandler.py"
click node_main_tab "https://github.com/elespike/burp-cph/blob/master/CPH_Config.py"
click node_config_tabs "https://github.com/elespike/burp-cph/blob/master/CPH_Config.py"
click node_options_tab "https://github.com/elespike/burp-cph/blob/master/CPH_Config.py"
click node_emv "https://github.com/elespike/burp-cph/blob/master/CPH_Config.py"
click node_scope_filter "https://github.com/elespike/burp-cph/blob/master/CustomParamHandler.py"
click node_rule_engine "https://github.com/elespike/burp-cph/blob/master/CustomParamHandler.py"
click node_value_sources "https://github.com/elespike/burp-cph/blob/master/CustomParamHandler.py"
click node_request_issuer "https://github.com/elespike/burp-cph/blob/master/CustomParamHandler.py"
click node_message_update "https://github.com/elespike/burp-cph/blob/master/CustomParamHandler.py"
click node_config_persistence "https://github.com/elespike/burp-cph/blob/master/CPH_Config.py"
click node_demo_server "https://github.com/elespike/burp-cph/blob/master/tinyweb.py"
click node_help_content "https://github.com/elespike/burp-cph/blob/master/CPH_Help.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_extension,node_burp_user toneBlue
class node_main_tab,node_config_tabs,node_options_tab,node_emv toneAmber
class node_scope_filter,node_rule_engine,node_value_sources,node_request_issuer,node_message_update toneMint
class node_config_persistence,node_demo_server,node_help_content toneRose
class node_burp_suite,node_target_service,node_config_file toneIndigo
```

## Components

### Burp runtime

- [Extension callbacks](https://github.com/elespike/burp-cph/blob/master/CustomParamHandler.py): `CustomParamHandler.py`

### Configuration UI

- [Main tab](https://github.com/elespike/burp-cph/blob/master/CPH_Config.py): `CPH_Config.py`
- [Rule tabs](https://github.com/elespike/burp-cph/blob/master/CPH_Config.py): `CPH_Config.py`
- [Scope options](https://github.com/elespike/burp-cph/blob/master/CPH_Config.py): `CPH_Config.py`
- [Modification viewer](https://github.com/elespike/burp-cph/blob/master/CPH_Config.py): `CPH_Config.py`

### Message processing

- [Scope filtering](https://github.com/elespike/burp-cph/blob/master/CustomParamHandler.py): `CustomParamHandler.py`
- [Regex replacement](https://github.com/elespike/burp-cph/blob/master/CustomParamHandler.py): `CustomParamHandler.py`
- [Dynamic value sources](https://github.com/elespike/burp-cph/blob/master/CustomParamHandler.py): `CustomParamHandler.py`
- [Request issuer](https://github.com/elespike/burp-cph/blob/master/CustomParamHandler.py): `CustomParamHandler.py`
- [Message update](https://github.com/elespike/burp-cph/blob/master/CustomParamHandler.py): `CustomParamHandler.py`

### Persistence and demos

- [Config persistence](https://github.com/elespike/burp-cph/blob/master/CPH_Config.py): `CPH_Config.py`
- [Interactive demo server](https://github.com/elespike/burp-cph/blob/master/tinyweb.py): `tinyweb.py`
- [Help content](https://github.com/elespike/burp-cph/blob/master/CPH_Help.py): `CPH_Help.py`

### Other components

- **Burp user**
- **Burp Suite**
- **HTTP target**
- **JSON config file**

## Connections

- Burp user → Main tab: configures
- Burp user → Extension callbacks: sends requests
- Burp Suite → Extension callbacks: dispatches callbacks
- Extension callbacks → Main tab: creates
- Main tab → Rule tabs: manages
- Main tab → Scope options: hosts
- Extension callbacks → Scope options: reads settings
- Extension callbacks → Scope filtering: checks messages
- Scope filtering → Rule tabs: selects rules
- Extension callbacks → Regex replacement: modifies messages
- Regex replacement → Dynamic value sources: uses extracted values
- Extension callbacks → Request issuer: issues configured request
- Request issuer → HTTP target: sends HTTP request
- Extension callbacks → Message update: writes modified message
- Extension callbacks → Modification viewer: records changes
- Burp user → Config persistence: saves or loads
- Config persistence → JSON config file: reads or writes
- Scope options → Interactive demo server: starts or stops
- Main tab → Help content: shows guidance
- Dynamic value sources → Rule tabs: reads cached responses
- Burp Suite → Dynamic value sources: provides macro response
