Skip to content

Commit

Permalink
Update virustotal_public.py
Browse files Browse the repository at this point in the history
When the total virus IP that was given to you was brought up, the link to go see the information on the page was not allowed because it had the name ip_address, this changed the one used now it is ip-address
  • Loading branch information
yudas-programador authored Nov 16, 2023
1 parent 0db0f8c commit 181e7a3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions misp_modules/modules/expansion/virustotal_public.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def create_misp_object(self, report: vt.Object) -> MISPObject:
elif report.type == 'domain':
misp_object = MISPObject('domain-ip')
misp_object.add_attribute('domain', type='domain', value=report.id)
elif report.type == 'ip_address':
elif report.type == 'ip-address':
misp_object = MISPObject('domain-ip')
misp_object.add_attribute('ip', type='ip-dst', value=report.id)
elif report.type == 'url':
Expand Down Expand Up @@ -112,7 +112,7 @@ def parse_domain(self, domain: str) -> str:
# RESOLUTIONS
resolutions_iterator = self.client.iterator(f'/domains/{domain_report.id}/resolutions', limit=self.limit)
for resolution in resolutions_iterator:
domain_object.add_attribute('ip', type='ip-dst', value=resolution.ip_address)
domain_object.add_attribute('ip', type='ip-dst', value=resolution.ip-address)

# COMMUNICATING AND REFERRER FILES
for relationship_name, misp_name in [
Expand Down Expand Up @@ -148,7 +148,7 @@ def parse_hash(self, file_hash: str) -> str:
return file_object.uuid

def parse_ip(self, ip: str) -> str:
ip_report = self.client.get_object(f'/ip_addresses/{ip}')
ip_report = self.client.get_object(f'/ip-addresses/{ip}')

# IP
ip_object = self.create_misp_object(ip_report)
Expand All @@ -161,7 +161,7 @@ def parse_ip(self, ip: str) -> str:
self.misp_event.add_object(**asn_object)

# RESOLUTIONS
resolutions_iterator = self.client.iterator(f'/ip_addresses/{ip_report.id}/resolutions', limit=self.limit)
resolutions_iterator = self.client.iterator(f'/ip-addresses/{ip_report.id}/resolutions', limit=self.limit)
for resolution in resolutions_iterator:
ip_object.add_attribute('domain', type='domain', value=resolution.host_name)

Expand Down

0 comments on commit 181e7a3

Please sign in to comment.