Spaces:
Sleeping
Sleeping
File size: 2,110 Bytes
a6ba120 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
from dataclasses import dataclass
@dataclass
class TotalVotes:
"""
Represents the total votes for an IP address.
Attributes:
harmless (int): The number of votes indicating the IP address is harmless.
malicious (int): The number of votes indicating the IP address is malicious.
"""
harmless: int
malicious: int
@dataclass
class AnalysisStats:
"""
Represents the statistics from the last analysis of an IP address.
Attributes:
malicious (int): The number of engines that detected the IP address as malicious.
suspicious (int): The number of engines that detected the IP address as suspicious.
undetected (int): The number of engines that did not detect any issues with the IP address.
harmless (int): The number of engines that detected the IP address as harmless.
timeout (int): The number of engines that timed out during the analysis.
"""
malicious: int
suspicious: int
undetected: int
harmless: int
timeout: int
@dataclass
class IPAddressReport:
"""
Represents a report for an IP address.
Attributes:
id (str): The ID of the IP address.
type (str): The type of the report (e.g., "ip_address").
reputation (int): The reputation score of the IP address.
continent (str): The continent where the IP address is located.
as_owner (str): The owner of the autonomous system (AS) associated with the IP address.
country (str): The country where the IP address is located.
tags (List[str]): A list of tags associated with the IP address.
total_votes (TotalVotes): The total votes for the IP address.
network (str): The network associated with the IP address.
last_analysis_stats (AnalysisStats): The statistics from the last analysis of the IP address.
"""
id: str
type: str
reputation: int
continent: str
as_owner: str
country: str
tags: list
total_votes: TotalVotes
network: str
last_analysis_stats: AnalysisStats |