MCPcopy Create free account
hub / github.com/blacklanternsecurity/bbot / BaseModule

Class BaseModule

bbot/modules/base.py:13–1787  ·  view source on GitHub ↗

The base class for all BBOT modules. Attributes: watched_events (List): Event types to watch. produced_events (List): Event types to produce. meta (Dict): Metadata about the module, such as whether authentication is required and a description. flags (List): Fl

Source from the content-addressed store, hash-verified

11
12
13class BaseModule:
14 """The base class for all BBOT modules.
15
16 Attributes:
17 watched_events (List): Event types to watch.
18
19 produced_events (List): Event types to produce.
20
21 meta (Dict): Metadata about the module, such as whether authentication is required and a description.
22
23 flags (List): Flags indicating the type of module (must have at least "safe" or "aggressive" and "passive" or "active").
24
25 deps_modules (List): Other BBOT modules this module depends on. Empty list by default.
26
27 deps_pip (List): Python dependencies to install via pip. Empty list by default.
28
29 deps_apt (List): APT package dependencies to install. Empty list by default.
30
31 deps_shell (List): Other dependencies installed via shell commands. Uses [ansible.builtin.shell](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/shell_module.html). Empty list by default.
32
33 deps_ansible (List): Additional Ansible tasks for complex dependencies. Empty list by default.
34
35 accept_dupes (bool): Whether to accept incoming duplicate events. Default is False.
36
37 suppress_dupes (bool): Whether to suppress outgoing duplicate events. Default is True.
38
39 per_host_only (bool): Limit the module to only scanning once per host. Default is False.
40
41 per_hostport_only (bool): Limit the module to only scanning once per host:port. Default is False.
42
43 per_domain_only (bool): Limit the module to only scanning once per domain. Default is False.
44
45 scope_distance_modifier (int, None): Modifies scope distance acceptance for events. Default is 0.
46 ```
47 None == accept all events
48 2 == accept events up to and including the scan's configured search distance plus two
49 1 == accept events up to and including the scan's configured search distance plus one
50 0 == (DEFAULT) accept events up to and including the scan's configured search distance
51 ```
52
53 target_only (bool): Accept only the initial target event(s). Default is False.
54
55 in_scope_only (bool): Accept only explicitly in-scope events, regardless of the scan's search distance. Default is False.
56
57 accept_url_special (bool): Accept "special" URLs not typically distributed to web modules, e.g. JS URLs. Default is False.
58
59 options (Dict): Customizable options for the module, e.g., {"api_key": ""}. Empty dict by default.
60
61 options_desc (Dict): Descriptions for options, e.g., {"api_key": "API Key"}. Empty dict by default.
62
63 module_threads (int): Maximum concurrent instances of handle_event() or handle_batch(). Default is 1.
64
65 batch_size (int): Size of batches processed by handle_batch(). Default is 1.
66
67 api_failure_abort_threshold (int): Threshold for setting error state after failed HTTP requests (only takes effect when `api_request()` is used. Default is 5.
68
69 _preserve_graph (bool): When set to True, accept events that may be duplicates but are necessary for construction of complete graph. Typically only enabled for output modules that need to maintain full chains of events, e.g. `neo4j` and `json`. Default is False.
70

Calls

no outgoing calls

Tested by 2

Used in the wild real call sites across dependent graphs

searching dependent graphs…