loading…
Search for a command to run...
loading…
Enables network vulnerability scanning and CVE detection through an AI assistant, with optional remote port blocking via Discord bot.
Enables network vulnerability scanning and CVE detection through an AI assistant, with optional remote port blocking via Discord bot.
A comprehensive network security platform that integrates automated vulnerability scanning, CVE detection, and remote firewall management. Built for seamless user interaction via AI assistants (Puch AI), with a web dashboard for audit logs and a Discord bot for instant port blocking.
Guardian Ops empowers users to scan their networks, detect threats, and respond in real-time—without leaving their chat interface.
Guardian Ops provides end-to-end security operations through a conversational AI interface:
mcp_server.py): FastMCP-based server for Puch AI integration. Handles scans with Nmap, CVE queries via httpx, and logging to SQLite.dashboard.py): FastAPI app with Jinja2 templates for user-facing logs and details.bot.py): discord.py bot for port management, executing shell scripts.scripts/): block_port.sh and unblock_port.sh for iptables rules.services/capstonebot.service): Systemd for bot auto-start.guardian_scans.db) for scan logs.User (Puch AI) → MCP Server (Scan Request) → Nmap Scan + CVE APIs → Report + Vuln Alert
↓
Dashboard (Logs) ← SQLite ← Scan Results
↓ (If Vulns)
User → Discord Bot (Authorize) → Shell Scripts → iptables → Persistent Rules
sudo apt install nmap).sudo apt install iptables-persistent).git clone <your-repo-url>
cd guardian-ops
Create .env in the root:
# MCP Server
AUTH_TOKEN=your_mcp_auth_token_here
MY_NUMBER=your_phone_number_here # e.g., 919876543210
VULNERS_API_KEY=your_vulners_key_optional
NVD_API_KEY=your_nvd_key_optional
DASHBOARD_URL=http://your-server-ip:8000 # Update with your dashboard URL
# Discord Bot
DISCORD_TOKEN=your_discord_bot_token_here
AUTHORIZED_USER_ID=your_discord_user_id_here # Numeric user ID
Load env: source .env (or use python-dotenv).
# MCP Server & Dashboard
pip install -r requirements-mcp.txt # Includes fastmcp, nmap, httpx, sqlalchemy, fastapi, etc.
# Discord Bot
cd discord-bot
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt # discord.py, python-dotenv
The SQLite DB auto-creates on first scan. Run migrations if needed:
python -c "from mcp_server import engine, Base; Base.metadata.create_all(engine)"
cd discord-bot/scripts
chmod +x block_port.sh unblock_port.sh
For Discord Bot:
sudo cp discord-bot/services/capstonebot.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable capstonebot.service
sudo systemctl start capstonebot.service
For MCP Server & Dashboard: Run manually or via systemd (see below).
python mcp_server.py (runs on :8086).python dashboard.py (runs on :8000).sudo journalctl -u capstonebot.service -f for bot logs.| Command | Example | Description |
|---|---|---|
| Quick Scan | OG quick scan on scanme.nmap.org |
Fast common ports + basic vulns. |
| Full Scan | OG full scan on example.com |
Thorough OS/service/vuln scan. |
| Port Check | OG port check on example.com port 80 |
Specific port status + service. |
| Vuln Scan | OG vuln scan apache 2.4 |
CVE search for service/version. |
| Network Discovery | OG network discovery 192.168.1.0/24 |
Find active hosts in subnet. |
Invite bot: https://discord.com/oauth2/authorize?client_id=1436272504128929852
(Authorize only once; commands restricted to your user ID.)
| Command | Usage | Description |
|---|---|---|
!ping |
!ping |
Bot responsiveness. |
!blockport |
!blockport 8080 |
Block TCP port (persistent). |
!unblockport |
!unblockport 8080 |
Unblock port. |
!helpme |
!helpme |
Command list. |
Example:
User: !blockport 8080
Bot: Blocked TCP port 8080.
Warning: Scans may trigger IDS/IPS. Use responsibly on authorized networks. Port blocking requires sudo—test in safe env.
guardian-ops/
├── nmap_puch_mcp.py # Puch AI MCP server
├── dashboard.py # FastAPI dashboard
├── requirements.txt # MCP + dashboard deps
├── templates/ # HTML: login.html, dashboard.html, scan_detail.html
├── discord-bot/
│ ├── bot.py # Discord bot
│ ├── requirements.txt # Bot deps
│ ├── .env # Bot env (or root)
│ ├── scripts/
│ │ ├── block_port.sh
│ │ └── unblock_port.sh
│ └── services/
│ └── capstonebot.service
└── guardian_scans.db # Auto-generated SQLite
nmap --version).journalctl -u capstonebot (bot); console for MCP/dashboard.@mcp.tool in mcp_server.py; update guardian_ops parser.iptables -I ufw-before-input -p udp --dport $PORT -j DROP.Educational capstone project—MIT License. Use responsibly.
Note: Guardian Ops handles powerful security tools. Always comply with laws and obtain permission for scans. Test on isolated networks first.
Выполни в терминале:
claude mcp add guardian-ops -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.