跳转到主要内容

代理插件构建器。

项目描述

代理插件构建器

一个使用 infectionmonkey/agent-builderinfectionmonkey/plugin-builder Docker镜像的软件包,构建一个可以在Monkey Island中安装并用于您网络模拟的代理插件存档。

它使用Python Docker API客户端连接到您的本地Docker环境并运行所需的docker命令。

入门

安装

使用 pip install . 安装代理插件构建器

运行代理插件构建器

安装后,如果pip将其安装在您的 $PATH 中,则可以通过简单调用以下命令启动代理插件构建器:

build_agent_plugin <PLUGIN_PATH>

其中

Required:
    PLUGIN_PATH: The path where you have the Agent Plugin code.

Optional:
    -b/--build-dir-path: The path where all needed build artifacts will be stored.
    If the directory is not empty, it will delete it using `shutil.rmtree`
    Default: <current_working_directory>/build

    -d/--dist-dir-path: The path where resulting Agent Plugin archive will be stored.
    Default: <current_working_directory>/dist

    -s/--source-dir-name: The name of the source directory.
    Default: <plugin_name>_<plugin_type>

    -pd/--platform-dependencies: The platform dependencies for the Agent Plugin.
    Options:
    common: All dependencies are packaged once, and shared across all platforms. This
        should only be used if all dependencies are known to be platform-independent.
    separate: Some or all dependencies are platform-dependent, and are therefore packaged
        separately for each supported platform. This is the most reliable option,
        however it results in a larger plugin file, since dependencies are
        duplicated for each platform.
    autodetect: The plugin builder will attempt to detect the best method to use.
    Default: autodetect

    -ver/--verify/--no-verify: Specify whether to verify the plugin's dependencies.
    --verify: Verify the integrity of the plugin's dependencies. (Recommended, default)
    --no-hverify: Do not verify the integrity of the plugin's dependencies. (Not recommended)
    not specified: Same as --verify.

    -v/--verbose: Multiple occurrences increases the logging level of the console logging.
    Example: -v means CRITICAL, -vvvvv means DEBUG.
    Default: if not specific, the logging level will be INFO.

使用Poetry

或者,也可以通过克隆此存储库并调用以下命令而不安装代理插件构建器:

poetry install
poetry run build_agent_plugin <PLUGIN_PATH>

开发

设置您的开发环境

运行以下命令以安装必要的先决条件:

pip install poetry pre-commit
poetry install
pre-commit install -t pre-commit -t prepare-commit-msg

运行单元测试

要运行所有自动化测试,请调用:

poetry run pytest

还有集成测试,它们较慢,可以通过调用以下命令来跳过:

poetry run pytest --skip-integration

项目详情


下载文件

下载适用于您的平台的文件。如果您不确定选择哪个,请了解有关 安装包 的更多信息。

源分布

agent_plugin_builder-0.6.0.tar.gz (24.4 kB 查看哈希值)

上传时间 源代码

构建的发行版

agent_plugin_builder-0.6.0-py3-none-any.whl (30.2 kB 查看哈希值)

上传时间 Python 3

由以下支持