forked from p34709852/monkey
Agent: Move master/threading_utils.py -> utils/threading.py
Both create_daemon_thread() and interruptable_iter() will need to be used outside of the master.
This commit is contained in:
parent
df42d0752a
commit
0c877833c5
|
@ -11,10 +11,10 @@ from infection_monkey.network import NetworkInterface
|
|||
from infection_monkey.telemetry.messengers.i_telemetry_messenger import ITelemetryMessenger
|
||||
from infection_monkey.telemetry.post_breach_telem import PostBreachTelem
|
||||
from infection_monkey.telemetry.system_info_telem import SystemInfoTelem
|
||||
from infection_monkey.utils.threading import create_daemon_thread
|
||||
from infection_monkey.utils.timer import Timer
|
||||
|
||||
from . import Exploiter, IPScanner, Propagator
|
||||
from .threading_utils import create_daemon_thread
|
||||
|
||||
CHECK_ISLAND_FOR_STOP_COMMAND_INTERVAL_SEC = 5
|
||||
CHECK_FOR_TERMINATE_INTERVAL_SEC = CHECK_ISLAND_FOR_STOP_COMMAND_INTERVAL_SEC / 5
|
||||
|
|
|
@ -7,8 +7,7 @@ from typing import Callable, Dict, List
|
|||
|
||||
from infection_monkey.i_puppet import ExploiterResultData, IPuppet
|
||||
from infection_monkey.model import VictimHost
|
||||
|
||||
from .threading_utils import run_worker_threads
|
||||
from infection_monkey.utils.threading import run_worker_threads
|
||||
|
||||
QUEUE_TIMEOUT = 2
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@ from infection_monkey.i_puppet import (
|
|||
PortStatus,
|
||||
)
|
||||
from infection_monkey.network import NetworkAddress
|
||||
from infection_monkey.utils.threading import run_worker_threads
|
||||
|
||||
from . import IPScanResults
|
||||
from .threading_utils import run_worker_threads
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@ from infection_monkey.network.scan_target_generator import compile_scan_target_l
|
|||
from infection_monkey.telemetry.exploit_telem import ExploitTelem
|
||||
from infection_monkey.telemetry.messengers.i_telemetry_messenger import ITelemetryMessenger
|
||||
from infection_monkey.telemetry.scan_telem import ScanTelem
|
||||
from infection_monkey.utils.threading import create_daemon_thread
|
||||
|
||||
from . import Exploiter, IPScanner, IPScanResults
|
||||
from .threading_utils import create_daemon_thread
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import logging
|
||||
from threading import Event
|
||||
|
||||
from infection_monkey.master.threading_utils import create_daemon_thread, interruptable_iter
|
||||
from infection_monkey.utils.threading import create_daemon_thread, interruptable_iter
|
||||
|
||||
|
||||
def test_create_daemon_thread():
|
Loading…
Reference in New Issue