CLI harness for Godzilla Security Testing Tool
Project description
cli-anything-godzilla
🚀 Generated by CLI-Anything | Optimized by @fengchenzxc
English
CLI harness for Godzilla Security Testing Tool.
Note: This is a standalone CLI tool that works with the original Godzilla GUI tool.
Features
- ✅ Complete project management (create, open, save, info)
- ✅ Shell management (add, list, update, remove, test connection)
- ✅ Short ID support (all shell commands support short IDs)
- ✅ C2 Profile management (load and validate)
- ✅ Interactive REPL mode with friendly UI
- ✅ JSON output mode for AI agent integration
- ✅ Compatible with original Godzilla project database
Installation
Prerequisites
- Python 3.12+ (tested with Python 3.12.8)
- Java Runtime Environment (JRE) 11+
- Godzilla JAR file (Godzilla15.jar)
Install the CLI
# From PyPI (when published)
pip install cli-anything-godzilla
# Or install locally for development
git clone https://github.com/fengchenzxc/cli-anything-godzilla.git
cd cli-anything-godzilla
pip install -e .
Verify Installation
which cli-anything-godzilla
cli-anything-godzilla --help
Usage
Start Interactive REPL Mode
# Start with no arguments (enter REPL mode)
cli-anything-godzilla
# Or specify a project
cli-anything-godzilla -p /path/to/project
Project Management
# Create a new project
cli-anything-godzilla project new -n "My Project" -d "Project description"
# Open an existing project
cli-anything-godzilla project open /path/to/project
# Show project information
cli-anything-godzilla project info
# List all projects
cli-anything-godzilla project list
# Close current project
cli-anything-godzilla project close
Shell Management
# Add a shell
cli-anything-godzilla shell add -u http://target.com/shell.jsp -p password
# List all shells
cli-anything-godzilla shell list
# Get shell details (supports short ID)
cli-anything-godzilla shell get 31f09e27
# Test shell connectivity (supports short ID)
cli-anything-godzilla shell test 31f09e27
# Update shell configuration
cli-anything-godzilla shell update 31f09e27 --remark "Updated remark"
# Remove a shell (supports short ID)
cli-anything-godzilla shell remove 31f09e27
# Export shells
cli-anything-godzilla shell export shells.json
# Import shells
cli-anything-godzilla shell import shells.json
C2 Profile Management
# List available profiles
cli-anything-godzilla profile list
# Load a profile
cli-anything-godzilla profile load /path/to/profile.yml
# Validate a profile
cli-anything-godzilla profile validate /path/to/profile.yml
JSON Output Mode
All commands support --json flag for machine-readable output:
cli-anything-godzilla --json shell list
cli-anything-godzilla --json shell get 31f09e27
cli-anything-godzilla --json project info
REPL Commands
When in interactive mode, use these commands:
| Command | Description |
|---|---|
help |
Show available commands |
exit |
Exit REPL mode |
project info |
Show project information |
project list |
List all projects |
shell list |
List all shells |
shell get <id> |
Get shell details |
shell add <url> <password> |
Add new shell |
shell test <id> |
Test shell connectivity |
shell update <id> --remark "xxx" |
Update shell remark |
shell remove <id> |
Remove shell |
profile list |
List C2 profiles |
Configuration
Supported Payload Types
JavaDynamicPayload- Java dynamic payloadCSharpDynamicPayload- C# dynamic payloadPhpDynamicPayload- PHP dynamic payload
Supported Encryption Types
xor- XOR encryptionaes128- AES-128 encryptionaes256- AES-256 encryptionbase64- Base64 encodinghex- Hexadecimal encodingraw- Raw datarsa- RSA encryption
Running Tests
# Run unit tests
cd /path/to/agent-harness
python3.12 -m pytest cli_anything/godzilla/tests/test_core.py -v
# Run E2E tests
python3.12 -m pytest cli_anything/godzilla/tests/test_full_e2e.py -v -s
# Run with force-installed mode
CLI_ANYTHING_FORCE_INSTALLED=1 python3.12 -m pytest cli_anything/godzilla/tests/ -v -s
简体中文
🚀 由 CLI-Anything 生成 | 由 @fengchenzxc 优化调优
CLI 命令行工具包,用于哥斯拉(Godzilla)WebShell 管理器的安全测试。
注意: 本项目是一个独立的 CLI 工具,与原版哥斯拉 GUI 工具配合使用。
功能特性
- ✅ 完整的项目管理(创建、打开、保存、信息)
- ✅ Shell 管理(添加、查看、更新、删除、测试连接)
- ✅ 短 ID 支持(所有 shell 命令支持使用短 ID)
- ✅ C2 Profile 管理(加载和验证)
- ✅ 交互式 REPL 模式,界面友好
- ✅ JSON 输出模式(便于 AI 代理集成)
- ✅ 兼容原版哥斯拉项目数据库
安装
前置要求
- Python 3.12+ (已测试 Python 3.12.8)
- Java Runtime Environment (JRE) 11+
- 哥斯拉 JAR 文件 (Godzilla15.jar)
安装 CLI
# 从 PyPI 安装 (发布后)
pip install cli-anything-godzilla
# 或本地开发安装
git clone https://github.com/fengchenzxc/cli-anything-godzilla.git
cd cli-anything-godzilla
pip install -e .
验证安装
which cli-anything-godzilla
cli-anything-godzilla --help
使用方法
启动交互式 REPL 模式
# 无参数启动(进入 REPL 模式)
cli-anything-godzilla
# 指定项目启动
cli-anything-godzilla -p /path/to/project
项目管理
# 创建新项目
cli-anything-godzilla project new -n "我的项目" -d "项目描述"
# 打开已有项目
cli-anything-godzilla project open /path/to/project
# 查看项目信息
cli-anything-godzilla project info
# 列出所有项目
cli-anything-godzilla project list
# 关闭当前项目
cli-anything-godzilla project close
Shell 管理
# 添加 shell
cli-anything-godzilla shell add -u http://target.com/shell.jsp -p password
# 列出所有 shell
cli-anything-godzilla shell list
# 获取 shell 详情(支持短 ID)
cli-anything-godzilla shell get 31f09e27
# 测试 shell 连接(支持短 ID)
cli-anything-godzilla shell test 31f09e27
# 更新 shell 配置
cli-anything-godzilla shell update 31f09e27 --remark "更新备注"
# 删除 shell(支持短 ID)
cli-anything-godzilla shell remove 31f09e27
# 导出 shell
cli-anything-godzilla shell export shells.json
# 导入 shell
cli-anything-godzilla shell import shells.json
C2 Profile 管理
# 列出可用的 profiles
cli-anything-godzilla profile list
# 加载 profile
cli-anything-godzilla profile load /path/to/profile.yml
# 验证 profile
cli-anything-godzilla profile validate /path/to/profile.yml
JSON 输出模式
所有命令支持 --json 标志,输出机器可读格式:
cli-anything-godzilla --json shell list
cli-anything-godzilla --json shell get 31f09e27
cli-anything-godzilla --json project info
REPL 交互命令
在交互模式下,可使用以下命令:
| 命令 | 描述 |
|---|---|
help |
显示可用命令 |
exit |
退出 REPL 模式 |
project info |
显示项目信息 |
project list |
列出所有项目 |
shell list |
列出所有 shell |
shell get <id> |
获取 shell 详情 |
shell add <url> <password> |
添加新 shell |
shell test <id> |
测试 shell 连接 |
shell update <id> --remark "xxx" |
更新 shell 备注 |
shell remove <id> |
删除 shell |
profile list |
列出 C2 profiles |
配置
支持的载荷类型
JavaDynamicPayload- Java 动态载荷CSharpDynamicPayload- C# 动态载荷PhpDynamicPayload- PHP 动态载荷
支持的加密方式
xor- XOR 加密aes128- AES-128 加密aes256- AES-256 加密base64- Base64 编码hex- 十六进制编码raw- 原始数据rsa- RSA 加密
运行测试
# 运行单元测试
cd /path/to/agent-harness
python3.12 -m pytest cli_anything/godzilla/tests/test_core.py -v
# 运行 E2E 测试
python3.12 -m pytest cli_anything/godzilla/tests/test_full_e2e.py -v -s
# 使用强制安装模式运行测试
CLI_ANYTHING_FORCE_INSTALLED=1 python3.12 -m pytest cli_anything/godzilla/tests/ -v -s
兼容性
- 可直接打开原版哥斯拉创建的项目(自动生成配置文件)
- 数据库列名使用 camelCase(与原版哥斯拉保持一致)
- 支持 HTTP 请求头的 JSON 和纯文本两种格式
Project Structure / 项目结构
cli_anything/godzilla/
├── __init__.py
├── godzilla_cli.py # Main CLI entry point / CLI 主入口
├── core/
│ ├── __init__.py
│ ├── project.py # Project management / 项目管理
│ ├── shell.py # Shell management / Shell 管理
│ ├── profile.py # C2 Profile management / C2 Profile 管理
│ └── database.py # Database operations / 数据库操作
├── utils/
│ ├── __init__.py
│ ├── godzilla_backend.py # Godzilla JAR integration / 哥斯拉 JAR 集成
│ └── repl_skin.py # REPL interface / REPL 界面
└── tests/
├── TEST.md # Test plan and results / 测试计划和结果
├── test_core.py # Unit tests / 单元测试
└── test_full_e2e.py # E2E tests / E2E 测试
License / 许可证
MIT License
Disclaimer / 免责声明
English: This tool is for authorized security testing and research purposes only. Unauthorized use is illegal.
中文: 本工具仅供安全研究和授权测试使用。使用本工具进行未经授权的测试是非法的。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cli_anything_godzilla-1.0.6.tar.gz.
File metadata
- Download URL: cli_anything_godzilla-1.0.6.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fe9fb6897c08c4d82849ee9a3932101c037357348e81db4f8988daaca230e8f
|
|
| MD5 |
0d3f1a18869b183b38ea38d15da1062d
|
|
| BLAKE2b-256 |
19fe2e9c23881e9490087a9c0dfb1bd7d9df6fd8073dd31c94f9594d95e9f626
|
Provenance
The following attestation bundles were made for cli_anything_godzilla-1.0.6.tar.gz:
Publisher:
release.yml on fengchenzxc/cli-anything-godzilla
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cli_anything_godzilla-1.0.6.tar.gz -
Subject digest:
3fe9fb6897c08c4d82849ee9a3932101c037357348e81db4f8988daaca230e8f - Sigstore transparency entry: 1096641281
- Sigstore integration time:
-
Permalink:
fengchenzxc/cli-anything-godzilla@8ffd2706982fbfa74c5f6395d40a83ada01cb340 -
Branch / Tag:
refs/tags/v1.0.6 - Owner: https://github.com/fengchenzxc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8ffd2706982fbfa74c5f6395d40a83ada01cb340 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cli_anything_godzilla-1.0.6-py3-none-any.whl.
File metadata
- Download URL: cli_anything_godzilla-1.0.6-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57f8cc55c7e82598525f10827d109dd62170520643c6e3e810944f37cd675cde
|
|
| MD5 |
f527e355f30204b2950cb6223f49daaf
|
|
| BLAKE2b-256 |
0522a3a8c1948ce68bf77d7cb9da5dbf17a57dd6c24072f8edec5a13f74870ea
|
Provenance
The following attestation bundles were made for cli_anything_godzilla-1.0.6-py3-none-any.whl:
Publisher:
release.yml on fengchenzxc/cli-anything-godzilla
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cli_anything_godzilla-1.0.6-py3-none-any.whl -
Subject digest:
57f8cc55c7e82598525f10827d109dd62170520643c6e3e810944f37cd675cde - Sigstore transparency entry: 1096641282
- Sigstore integration time:
-
Permalink:
fengchenzxc/cli-anything-godzilla@8ffd2706982fbfa74c5f6395d40a83ada01cb340 -
Branch / Tag:
refs/tags/v1.0.6 - Owner: https://github.com/fengchenzxc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8ffd2706982fbfa74c5f6395d40a83ada01cb340 -
Trigger Event:
push
-
Statement type: