Files
IoT_PreTester_V46_Demo/django_project/analyzer/__init__.py
T
2026-08-19 08:04:59 +02:00

38 lines
1.3 KiB
Python

"""Framework-independent analysis core for IoT PreTester 4.6 Demo.
The package is independent of Django and supports both backend and CLI use.
The pyshark/tshark extractor is loaded only when a capture is analyzed.
Headless example:
from analyzer import AnalysisEngine, render
result = AnalysisEngine().analyze_pcap("capture.pcapng")
print(render(result, "md"))
Synthetic-context example without tshark:
from analyzer import AnalysisEngine
from analyzer.context import CaptureContext
result = AnalysisEngine().analyze_context(CaptureContext(...))
"""
from __future__ import annotations
from .findings import Finding, Category, Severity, Confidence
from .context import CaptureContext
from .engine import AnalysisEngine, AnalysisResult, result_from_dict
from .reporting import render, FORMATS
from .artifacts import (
UrlArtifact, HashArtifact, extract_urls, extract_hashes, identify_hash_mode,
)
# Importing the package registers every detector.
from . import detectors # noqa: F401
__version__ = "4.6.0-demo.0"
__all__ = [
"Finding", "Category", "Severity", "Confidence",
"CaptureContext", "AnalysisEngine", "AnalysisResult", "result_from_dict",
"render", "FORMATS", "__version__",
"UrlArtifact", "HashArtifact", "extract_urls", "extract_hashes", "identify_hash_mode",
]