예제 #1
0
    def test_active_dns(self, mock_get=None, mock_post=None):
        # Google
        google_report = active_dns.ActiveDNS(
            "ActiveDNS_Google",
            self.job_id,
            self.observable_name,
            self.observable_classification,
            {
                "service": "google"
            },
        ).start()

        self.assertEqual(google_report.get("success", False), True,
                         f"google_report: {google_report}")

        # CloudFlare
        cloudflare_report = active_dns.ActiveDNS(
            "ActiveDNS_CloudFlare",
            self.job_id,
            self.observable_name,
            self.observable_classification,
            {
                "service": "cloudflare"
            },
        ).start()

        self.assertEqual(
            cloudflare_report.get("success", False),
            True,
            f"cloudflare_report: {cloudflare_report}",
        )
        # Classic
        classic_report = active_dns.ActiveDNS(
            "ActiveDNS_Classic",
            self.job_id,
            self.observable_name,
            self.observable_classification,
            {
                "service": "classic"
            },
        ).start()

        self.assertEqual(
            classic_report.get("success", False),
            True,
            f"classic_report: {classic_report}",
        )
예제 #2
0
    def test_cloudFlare_malware(self, mock_get=None, mock_post=None):
        report = active_dns.ActiveDNS(
            "ActiveDNS_CloudFlare_Malware",
            self.job_id,
            self.observable_name,
            self.observable_classification,
            {
                "service": "cloudflare_malware"
            },
        ).start()

        self.assertEqual(report.get("success", False), True,
                         f"report: {report}")
예제 #3
0
def activedns_run(
    analyzer_name,
    job_id,
    observable_name,
    observable_classification,
    additional_config_params,
):
    active_dns.ActiveDNS(
        analyzer_name,
        job_id,
        observable_name,
        observable_classification,
        additional_config_params,
    ).start()