Skip to content

Commit

Permalink
fix agent tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechromancer committed Sep 14, 2023
1 parent 8ce5db8 commit 995b34e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions bbot/scanner/target.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging
import ipaddress
from copy import deepcopy
from contextlib import suppress

from bbot.core.errors import *
Expand Down Expand Up @@ -159,11 +158,11 @@ def events(self):

def copy(self):
"""
Creates and returns a copy of the Target object, including a deep copy of the `_events` attribute.
Creates and returns a copy of the Target object, including a shallow copy of the `_events` attribute.
Returns:
Target: A new Target object with the same `scan` and `strict_scope` attributes as the original.
A deep copy of the `_events` dictionary is made.
A shallow copy of the `_events` dictionary is made.
Examples:
>>> original_target = Target(scan, "example.com")
Expand All @@ -181,7 +180,7 @@ def copy(self):
- The `scan` object reference is kept intact in the copied Target object.
"""
self_copy = self.__class__(self.scan, strict_scope=self.strict_scope)
self_copy._events = deepcopy(self._events)
self_copy._events = dict(self._events)
return self_copy

def get(self, host):
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/event.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This is a developer reference. For a high-level description of BBOT events, plus a full list of event types, see [Events](../../scanning/events)
This is a developer reference. For a high-level description of BBOT events including a full list of event types, see [Events](../../scanning/events)

::: bbot.core.event.base.make_event
::: bbot.core.event.base.event_from_json
Expand Down

0 comments on commit 995b34e

Please sign in to comment.