Overview
TheAuditEngine class coordinates the complete security audit workflow, executing all phases from reconnaissance to reporting.
Class Definition
Constructor Parameters
The IP address of the target host to audit
Instance Attributes
The target IP address being audited
Host object containing audit results. Populated after running the audit.
Methods
run_full_audit()
Executes a complete security audit through six phases:- Reconnaissance (Nmap) - Port scanning and service detection
- Directory Enumeration (Gobuster) - Web directory discovery
- SQL Injection (SQLMap) - DVWA SQL injection testing and database dumping
- WordPress Testing (WPScan) - WordPress vulnerability scanning and brute-force
- Hash Cracking - Credential hash cracking (MD5)
- Risk Analysis - Overall risk level calculation
This method does not return a value. Results are stored in
self.host and a PDF report is generated.Workflow Details
Phase 1: ReconnaissanceHost object with discovered ports and services.
Phase 2: Directory Enumeration
directories attribute with discovered web paths.
Phase 3: SQL Injection
outputs/ directory.
Usage Example
Output
The audit produces:- Console output with color-coded progress and results
- PDF report:
outputs/REPORT_{ip}_*.pdf - Raw tool outputs in
outputs/directory
Console Summary
After completion, displays:- Number of open ports
- Directories discovered
- Total vulnerabilities found
- Credentials extracted
- Overall risk level
- Report file location
Dependencies
Required services:NmapScanner- audit_engine.py:1GobusterEnum- audit_engine.py:4SQLMapInjector- audit_engine.py:3WPForceBrute- audit_engine.py:2HashCracker- audit_engine.py:5RiskAnalyzer- audit_engine.py:6PDFReportGenerator- audit_engine.py:7