Skip to content

Commit

Permalink
Move hostname_extract under events and fix validator call (#1203)
Browse files Browse the repository at this point in the history
  • Loading branch information
udgover authored Dec 4, 2024
1 parent 4b2ec71 commit b94fab4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def run(self, message: EventMessage) -> None:
url = message.event.yeti_object
self.logger.info(f"Extracting hostname from: {url.value}")
o = urlparse(url.value)
if observable.IPv4.is_valid(o.hostname):
if observable.IPv4.validator(o.hostname):
extracted_obs = observable.IPv4(value=o.hostname).save()
else:
extracted_obs = observable.Hostname(value=o.hostname).save()
Expand Down

0 comments on commit b94fab4

Please sign in to comment.