a51d968185
- Complete security menu restructure (3-mode: Analysis/Actions/Live) - Intelligent cPHulk enablement with CSF whitelist import - Live network security monitoring dashboard - Multi-source threat detection and classification - 50+ organized security tools across 4-level menu hierarchy - System health diagnostics with cPanel/WHM integration - Reference database for cross-module intelligence sharing
131 lines
4.9 KiB
Markdown
131 lines
4.9 KiB
Markdown
# Server Toolkit - Project Structure
|
|
|
|
## Directory Layout
|
|
|
|
```
|
|
server-toolkit/
|
|
├── launcher.sh # Main entry point
|
|
├── README.md # Project documentation
|
|
├── TROUBLESHOOTING.md # Troubleshooting guide
|
|
├── AUDIT-REPORT.md # Project audit results
|
|
├── REFDB_FORMAT.txt # Development notes & bug tracker
|
|
│
|
|
├── config/ # Configuration files
|
|
│ ├── settings.conf # Main configuration
|
|
│ ├── settings.conf.minimal # Minimal config (template)
|
|
│ ├── whitelist-ips.txt # IP whitelist for bot analyzer
|
|
│ └── whitelist-user-agents.txt # User-agent whitelist
|
|
│
|
|
├── lib/ # Core libraries
|
|
│ ├── common-functions.sh # Shared utilities (print, colors, etc.)
|
|
│ ├── system-detect.sh # Auto-detect control panel, OS, etc.
|
|
│ ├── user-manager.sh # User/domain selection functions
|
|
│ ├── reference-db.sh # System reference database builder
|
|
│ └── mysql-analyzer.sh # MySQL analysis functions
|
|
│
|
|
├── modules/ # Feature modules
|
|
│ ├── security/
|
|
│ │ └── bot-analyzer.sh # ✓ Bot & botnet analysis (WORKING)
|
|
│ ├── performance/
|
|
│ │ └── mysql-query-analyzer.sh # ✓ MySQL query analysis (WORKING)
|
|
│ ├── wordpress/ # (Empty - future development)
|
|
│ ├── backup/ # (Empty - future development)
|
|
│ ├── monitoring/ # (Empty - future development)
|
|
│ ├── troubleshooting/ # (Empty - future development)
|
|
│ └── reporting/ # (Empty - future development)
|
|
│
|
|
└── tools/ # Diagnostic & testing tools
|
|
├── diagnostic-report.sh # System diagnostic collector
|
|
└── test-domain-detection.sh # Domain detection validator
|
|
```
|
|
|
|
## File Purposes
|
|
|
|
### Root Level
|
|
- **launcher.sh** - Main menu system, calls modules
|
|
- **README.md** - User-facing documentation
|
|
- **TROUBLESHOOTING.md** - Help guide for common issues
|
|
- **AUDIT-REPORT.md** - Technical audit results (for developers)
|
|
- **REFDB_FORMAT.txt** - Development log, bug tracking, enhancement notes
|
|
|
|
### Config Directory
|
|
Contains user-configurable settings:
|
|
- **settings.conf** - Main config (includes unused future settings)
|
|
- **settings.conf.minimal** - Clean template with only current settings
|
|
- **whitelist-*.txt** - Bot analyzer whitelists
|
|
|
|
### Lib Directory
|
|
Core library functions sourced by modules:
|
|
- **common-functions.sh** - Colors, print functions, formatting
|
|
- **system-detect.sh** - Auto-detect environment (cPanel/Plesk/etc)
|
|
- **user-manager.sh** - User selection, domain detection
|
|
- **reference-db.sh** - Build/manage system reference database
|
|
- **mysql-analyzer.sh** - MySQL analysis helper functions
|
|
|
|
### Modules Directory
|
|
Feature implementations:
|
|
- **security/** - Security tools (bot analyzer, etc.)
|
|
- **performance/** - Performance tools (MySQL analyzer, etc.)
|
|
- **wordpress/** through **reporting/** - Placeholder for future
|
|
|
|
### Tools Directory
|
|
Diagnostic and testing utilities:
|
|
- **diagnostic-report.sh** - Generates comprehensive system report
|
|
- **test-domain-detection.sh** - Quick validation of domain detection
|
|
|
|
## Working Features
|
|
|
|
### Fully Implemented (✓)
|
|
1. **Bot & Botnet Analyzer** (`modules/security/bot-analyzer.sh`)
|
|
- Comprehensive log analysis
|
|
- Threat scoring
|
|
- IP blocking recommendations
|
|
- CSF integration
|
|
- Attack vector detection
|
|
|
|
2. **MySQL Query Analyzer** (`modules/performance/mysql-query-analyzer.sh`)
|
|
- Slow query detection
|
|
- Query performance analysis
|
|
|
|
3. **System Detection** (`lib/system-detect.sh`)
|
|
- Auto-detect: cPanel, Plesk, InterWorx
|
|
- OS, web server, database detection
|
|
- Resource monitoring
|
|
|
|
4. **User Management** (`lib/user-manager.sh`)
|
|
- Interactive user selection
|
|
- Arrow-key navigation
|
|
- Search with confirmation
|
|
- Domain detection
|
|
|
|
## In Development (Future)
|
|
|
|
- WordPress Management (11 planned scripts)
|
|
- Backup & Recovery (7 planned scripts)
|
|
- Monitoring & Alerts (5 planned scripts)
|
|
- Troubleshooting (9 planned scripts)
|
|
- Reporting (6 planned scripts)
|
|
|
|
See AUDIT-REPORT.md for complete list.
|
|
|
|
## Configuration
|
|
|
|
Most settings auto-detect on first run. Manual configuration available in:
|
|
- `config/settings.conf` - All settings (includes future features)
|
|
- `config/settings.conf.minimal` - Only current features
|
|
|
|
## Logs & Cache
|
|
|
|
Runtime files (auto-created):
|
|
- `.sysref` - System reference database cache
|
|
- `/tmp/bot_analysis_*.txt` - Bot analysis reports
|
|
- `/tmp/mysql_analysis_*.txt` - MySQL analysis reports
|
|
- `/tmp/server-toolkit-*` - Temporary session directories
|
|
|
|
## For Developers
|
|
|
|
Key technical documentation:
|
|
- **AUDIT-REPORT.md** - What's implemented vs. planned
|
|
- **REFDB_FORMAT.txt** - Bug fixes, enhancements, lessons learned
|
|
- **TROUBLESHOOTING.md** - Common issues and debug procedures
|