INNER CODE UNIT · Python

supported_types

stanfrbd/cyberbro · engines/abuseipdb.py:19

    def supported_types(self) -> ObservableType:
        return ObservableType.IPV4 | ObservableType.IPV6

    @property
    def execute_after_reverse_dns(self):
        # AbuseIPDB only supports IPs, so we want it to run AFTER any potential DNS resolution
        return True

    def analyze(self, observable: Observable) -> dict | None:
        api_key: str = self.secrets.abuseipdb

        if not api_key:
            logger.warning("AbuseIPDB API key not set")
            return None

        url = "https://api.abuseipdb.com/api/v2/check"
        headers = {"Key": api_key, "Accept": "application/json"}
        params = {"ipAddress": observable.value}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…