Start OWASP ZAP daemon
()
| 17974 | break |
| 17975 | |
| 17976 | if not enriched_finding: |
| 17977 | # Try to create a new enrichment for the target |
| 17978 | finding = { |
| 17979 | 'id': hashlib.md5(target.encode()).hexdigest()[:12], |
| 17980 | 'host': target if _is_ip_address(target) else None, |
| 17981 | 'domain': target if '.' in target and not _is_ip_address(target) else None, |
| 17982 | 'hash': target if len(target) >= 32 and all(c in '0123456789abcdefABCDEF' for c in target) else None, |
| 17983 | 'vulnerability': f'Threat intelligence analysis for {target}', |
| 17984 | 'severity': 'medium', |
| 17985 | 'details': {'target': target} |
| 17986 | } |
| 17987 | |
| 17988 | import asyncio |
| 17989 | enriched_finding = asyncio.run(threat_intelligence.enrich_finding_with_threat_intelligence(finding)) |
| 17990 | |
| 17991 | # Generate report content |
| 17992 | report_content = generate_threat_intelligence_report(target, enriched_finding) |
| 17993 | |
| 17994 | # Create text report |
| 17995 | text_content = create_text_report(report_content) |
| 17996 | |
| 17997 | # Generate filename with current date |
| 17998 | from datetime import datetime |
| 17999 | now = datetime.now() |
| 18000 | date_str = now.strftime("%Y%m%d_%H%M%S") |
nothing calls this directly
no test coverage detected