MCPcopy Create free account
hub / github.com/adobe/Marinus / get_domain_report

Method get_domain_report

python3_cron_scripts/libs3/VirusTotal.py:77–103  ·  view source on GitHub ↗

Get The Virustotal report for the given domain. :param domain: The name of the domain to search. :return: The JSON response or None if not found.

(self, domain)

Source from the content-addressed store, hash-verified

75 self.APIKEY = self.PUBLIC_APIKEY
76
77 def get_domain_report(self, domain):
78 """
79 Get The Virustotal report for the given domain.
80
81 :param domain: The name of the domain to search.
82 :return: The JSON response or None if not found.
83 """
84 req = requests.get(
85 (
86 self.URL
87 + "domain/report"
88 + "?apikey="
89 + self.APIKEY
90 + "&domain="
91 + domain
92 ),
93 timeout=120,
94 )
95 if req.status_code != 200:
96 self._logger.error("Error: " + str(req.status_code))
97 return None
98 try:
99 res = json.loads(req.text)
100 except:
101 return None
102
103 return res

Callers 1

mainFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected