forked from p34709852/monkey
Documentation CR fixes
This commit is contained in:
parent
764f5940d8
commit
204dea4754
|
@ -29,7 +29,7 @@ from infection_monkey.post_breach.pba import PBA
|
|||
class MyNewPba(PBA):
|
||||
```
|
||||
|
||||
3. Set the action name in the C'tor, like so:
|
||||
3. Set the action name in the constructor, like so:
|
||||
|
||||
```python
|
||||
class MyNewPba(PBA):
|
||||
|
|
|
@ -29,7 +29,7 @@ from infection_monkey.system_info.system_info_collector import SystemInfoCollect
|
|||
class MyNewCollector(SystemInfoCollector):
|
||||
```
|
||||
|
||||
3. Set the Collector name in the C'tor, like so:
|
||||
3. Set the Collector name in the constructor, like so:
|
||||
|
||||
```py
|
||||
class MyNewCollector(SystemInfoCollector):
|
||||
|
@ -41,17 +41,13 @@ class MyNewCollector(SystemInfoCollector):
|
|||
|
||||
Override the `collect` method with your own implementation. See the `EnvironmentCollector.py` Collector for reference. You can log during collection as well.
|
||||
|
||||
#### Configuration
|
||||
|
||||
Add the new collector to `infection_monkey/config.py`
|
||||
|
||||
### Island side
|
||||
|
||||
#### Configuration
|
||||
#### Island Configuration
|
||||
|
||||
##### `definitions`
|
||||
##### Definitions
|
||||
|
||||
You'll need to add your Collector to the `config_schema.py` file, under `definitions/system_info_collectors_classes/anyOf`, like so:
|
||||
You'll need to add your Collector to the `monkey_island/cc/services/config_schema.py` file, under `definitions/system_info_collectors_classes/anyOf`, like so:
|
||||
|
||||
```json
|
||||
"system_info_collectors_classes": {
|
||||
|
@ -78,7 +74,7 @@ You'll need to add your Collector to the `config_schema.py` file, under `definit
|
|||
},
|
||||
```
|
||||
|
||||
##### `properties`
|
||||
##### properties
|
||||
|
||||
Also, you can add the Collector to be used by default by adding it to the `default` key under `properties/monkey/system_info/system_info_collectors_classes`:
|
||||
|
||||
|
|
|
@ -36,9 +36,9 @@ Currently implemented Fingerprint modules are:
|
|||
|
||||
To add a new scanner/fingerprinter, create a new class that inherits from [`HostScanner`][host-scanner] or [`HostFinger`][host-finger] (depending on the interface). The class should be under the network module and should be imported under [`network/__init__.py`](https://github.com/guardicore/monkey/blob/master/monkey/infection_monkey/network/__init__.py).
|
||||
|
||||
To be used by default, two files need to be changed - [`config.py`](https://github.com/guardicore/monkey/blob/master/monkey/infection_monkey/config.py) and [`example.conf`](https://github.com/guardicore/monkey/blob/master/monkey/infection_monkey/example.conf) to add references to the new class.
|
||||
To be used by default, two files need to be changed - [`infection_monkey/config.py`](https://github.com/guardicore/monkey/blob/master/monkey/infection_monkey/config.py) and [`infection_monkey/example.conf`](https://github.com/guardicore/monkey/blob/master/monkey/infection_monkey/example.conf) to add references to the new class.
|
||||
|
||||
At this point, the Monkey knows how to use the new scanner/fingerprinter but to make it easy to use, the UI needs to be updated. The relevant UI file is [`config.py`](https://github.com/guardicore/monkey/blob/master/monkey/monkey_island/cc/services/config.py) (not to be confused with the prior `config.py`).
|
||||
At this point, the Monkey knows how to use the new scanner/fingerprinter but to make it easy to use, the UI needs to be updated. The relevant UI file is [`monkey_island/cc/services/config.py`](https://github.com/guardicore/monkey/blob/master/monkey/monkey_island/cc/services/config.py).
|
||||
|
||||
[elastic-finger]: https://github.com/guardicore/monkey/blob/develop/monkey/infection_monkey/network/elasticfinger.py
|
||||
[http-finger]: https://github.com/guardicore/monkey/blob/develop/monkey/infection_monkey/network/httpfinger.py
|
||||
|
|
Loading…
Reference in New Issue