> ## Documentation Index
> Fetch the complete documentation index at: https://p-bitm-2269ecee.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Modules

> Create, review, and execute operator-triggered module payloads.

Modules are operator-triggered HTML and JavaScript payload definitions. They
are stored in the module library and may be assigned to campaigns.

## Library operations

Each module defines a name, description, category, optional icon and link,
input descriptors, and a payload. The backend validates size and shape before
persistence.

<Steps>
  <Step title="Open the module editor" icon="plus">
    Open **Modules** and select **New Module**.
  </Step>

  <Step title="Define the contract" icon="file">
    Enter the name, description, category, optional icon and link, and the
    inputs the operator must supply.
  </Step>

  <Step title="Add the payload" icon="code-xml">
    Add the bounded HTML and JavaScript payload, including deterministic
    cleanup for timers, listeners, media resources, and visible UI.
  </Step>

  <Step title="Save and assign" icon="list-checks">
    Save the module, then select it in the campaign wizard. It becomes available
    to authorized operators for execution on an active selected session.
  </Step>
</Steps>

<Frame>
  <img src="https://mintcdn.com/p-bitm-2269ecee/9BS4YJCQtZV5PBjE/assets/screenshots/user-guide/modules-editor.png?fit=max&auto=format&n=9BS4YJCQtZV5PBjE&q=85&s=842253f1ffd557a017552cab841a4ea6" alt="Module editor showing name, description, parameters, and HTML/JavaScript payload" width="2880" height="1852" data-path="assets/screenshots/user-guide/modules-editor.png" />
</Frame>

## Controlled module demonstrations

Each recording below uses synthetic data and a target covered by written
authorization. Treat them as demonstrations of visible behavior and cleanup,
not as operating instructions.

### ClickFix module

<Frame>
  <video alt="Controlled ClickFix module demonstration" controls playsInline preload="metadata" className="w-full rounded-xl" src="https://mintcdn.com/p-bitm-2269ecee/rZ_ctlIxJ7DPKLJt/assets/videos/client_modules/clickfix_module.mp4?fit=max&auto=format&n=rZ_ctlIxJ7DPKLJt&q=85&s=76dda8111e77680292eab2bac066d426" data-path="assets/videos/client_modules/clickfix_module.mp4" />
</Frame>

### Credential collection module

<Frame>
  <video alt="Controlled credential-collection module demonstration with synthetic data" controls playsInline preload="metadata" className="w-full rounded-xl" src="https://mintcdn.com/p-bitm-2269ecee/rZ_ctlIxJ7DPKLJt/assets/videos/client_modules/credential_harvesting_module.mp4?fit=max&auto=format&n=rZ_ctlIxJ7DPKLJt&q=85&s=d118690de3e46d8520712921ac200ada" data-path="assets/videos/client_modules/credential_harvesting_module.mp4" />
</Frame>

### Face KYC module

<Frame>
  <video alt="Controlled face-KYC module demonstration with synthetic data" controls playsInline preload="metadata" className="w-full rounded-xl" src="https://mintcdn.com/p-bitm-2269ecee/rZ_ctlIxJ7DPKLJt/assets/videos/client_modules/face_kyc_module.mp4?fit=max&auto=format&n=rZ_ctlIxJ7DPKLJt&q=85&s=ad5d3270881c9b3ff23840e8c83624e0" data-path="assets/videos/client_modules/face_kyc_module.mp4" />
</Frame>

### Network scanner module

<Frame>
  <video alt="Controlled network-scanner module demonstration" controls playsInline preload="metadata" className="w-full rounded-xl" src="https://mintcdn.com/p-bitm-2269ecee/rZ_ctlIxJ7DPKLJt/assets/videos/client_modules/network_scanner_module.mp4?fit=max&auto=format&n=rZ_ctlIxJ7DPKLJt&q=85&s=fd89b3aa105154f80520a78d2398f200" data-path="assets/videos/client_modules/network_scanner_module.mp4" />
</Frame>

The Modules page also supports editing, cloning, exporting, and deleting
library records. The exported JSON is suitable for backup, review, or use as a
source definition. The dashboard does not currently provide a module-import
action.

To ship a reviewed module as a repository seed, add its JSON definition to the
top level of `modules/` before the backend's initial startup. The supplied
Compose files mount that directory at `/modules` and enable seed data. At
startup, P-BitM reads its `*.json` files only when the module library is empty.
If the deployment already contains a module, adding another file to `modules/`
does not import it; re-create that definition with **New Module**.

Module inputs are resolved when an authorized operator executes the module for
a selected active session. The backend wraps visual content in a managed
overlay and supplies cleanup behavior.

## Safety

Modules are active code. Review them for:

* engagement scope and expected user-visible behavior;
* safe parameter handling;
* bounded output;
* campaign-local data submission;
* reliable cleanup;
* absence of hard-coded secrets or unrelated external endpoints.

Do not use library examples as authorization to execute a module. Scope and
operator approval remain external requirements.

See the [module format reference](/reference/module-format).

Developers preparing a reusable seed module or runtime change should also read
[creating and contributing attack vectors](/development/attack-vectors).
