MCPcopy
hub / github.com/zakirkun/deep-eye / main

Function main

examples/basic_usage.py:19–71  ·  view source on GitHub ↗

Example usage.

()

Source from the content-addressed store, hash-verified

17)
18
19def main():
20 """Example usage."""
21
22 # Load configuration
23 config = ConfigLoader.load("config/config.yaml")
24
25 # Initialize AI Provider
26 ai_manager = AIProviderManager(config)
27 ai_manager.set_provider("openai") # or "claude", "grok", "ollama"
28
29 # Configure scan
30 target_url = "https://example.com"
31
32 # Initialize Scanner
33 scanner = ScannerEngine(
34 target_url=target_url,
35 config=config,
36 ai_manager=ai_manager,
37 depth=2,
38 threads=5,
39 verbose=True
40 )
41
42 print(f"[*] Starting scan on {target_url}")
43
44 # Run scan
45 results = scanner.scan(
46 enable_recon=True,
47 full_scan=True
48 )
49
50 print(f"[+] Scan complete!")
51 print(f"[+] Found {len(results['vulnerabilities'])} vulnerabilities")
52
53 # Generate report
54 report_gen = ReportGenerator(config)
55
56 # Generate HTML report
57 report_gen.generate(
58 results=results,
59 output_path="reports/scan_report.html",
60 format="html"
61 )
62
63 print(f"[+] Report saved to: reports/scan_report.html")
64
65 # Print summary
66 severity_counts = results['severity_summary']
67 print("\n=== Vulnerability Summary ===")
68 print(f"Critical: {severity_counts.get('critical', 0)}")
69 print(f"High: {severity_counts.get('high', 0)}")
70 print(f"Medium: {severity_counts.get('medium', 0)}")
71 print(f"Low: {severity_counts.get('low', 0)}")
72
73
74if __name__ == "__main__":

Callers 1

basic_usage.pyFile · 0.70

Calls 8

set_providerMethod · 0.95
scanMethod · 0.95
generateMethod · 0.95
AIProviderManagerClass · 0.90
ScannerEngineClass · 0.90
ReportGeneratorClass · 0.90
loadMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected