MCPcopy Create free account
hub / github.com/TheSecuredAnalyst/security-suite / display_result

Function display_result

cli/main.py:176–213  ·  view source on GitHub ↗

Display scan result in a nice format.

(result)

Source from the content-addressed store, hash-verified

174
175
176def display_result(result):
177 """Display scan result in a nice format."""
178 if not result.success:
179 console.print("[red]Scan failed with errors:[/red]")
180 for error in result.errors:
181 console.print(f" - {error}")
182 return
183
184 # Show findings
185 if result.findings:
186 for finding in result.findings:
187 severity_colors = {
188 "critical": "red bold",
189 "high": "red",
190 "medium": "yellow",
191 "low": "blue",
192 "info": "green",
193 }
194 color = severity_colors.get(finding.severity.value, "white")
195
196 panel = Panel(
197 f"[{color}]{finding.description}[/{color}]",
198 title=f"[{color}][{finding.severity.value.upper()}] {finding.title}[/{color}]",
199 border_style=color,
200 )
201 console.print(panel)
202
203 if finding.data:
204 for key, value in finding.data.items():
205 if isinstance(value, list) and len(value) > 5:
206 console.print(f" {key}: {value[:5]} ... ({len(value)} total)")
207 else:
208 console.print(f" {key}: {value}")
209 console.print()
210
211 # Duration
212 if result.duration_seconds:
213 console.print(f"[dim]Completed in {result.duration_seconds:.2f}s[/dim]")
214
215
216# ============== OSINT Commands ==============

Callers 15

osint_dnsFunction · 0.85
osint_whoisFunction · 0.85
osint_subdomainsFunction · 0.85
osint_headersFunction · 0.85
osint_portsFunction · 0.85
osint_techFunction · 0.85
osint_emailsFunction · 0.85
osint_virustotalFunction · 0.85
osint_shodanFunction · 0.85
osint_fullFunction · 0.85
scan_crawlFunction · 0.85
scan_xssFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected