Skip to content

Commit

Permalink
Cryptojacker: Modify stubbed components to accept correct parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyamalviya committed Aug 9, 2023
1 parent 2ce4461 commit 13e2d7b
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
from typing import Optional

from common.event_queue import IAgentEventPublisher
from common.types import AgentID, SocketAddress


class BitcoinMiningNetworkTrafficSimulator:
def __init__(
self,
island_server_address: SocketAddress,
agent_id: AgentID,
agent_event_publisher: IAgentEventPublisher,
):
self._island_server_address = island_server_address
self._agent_id = agent_id
self._agent_event_publisher = agent_event_publisher

def start(self):
pass

Expand Down
12 changes: 10 additions & 2 deletions monkey/agent_plugins/payloads/cryptojacker/src/cpu_utilizer.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
from typing import Optional

from common.types import PercentLimited
from common.event_queue import IAgentEventPublisher
from common.types import AgentID, PercentLimited


class CPUUtilizer:
def __init__(self, cpu_utilization: PercentLimited):
def __init__(
self,
cpu_utilization: PercentLimited,
agent_id: AgentID,
agent_event_publisher: IAgentEventPublisher,
):
self._cpu_utilization = cpu_utilization
self._agent_id = agent_id
self._agent_event_publisher = agent_event_publisher

def start(self):
pass
Expand Down
12 changes: 10 additions & 2 deletions monkey/agent_plugins/payloads/cryptojacker/src/memory_utilizer.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
from typing import Optional

from common.types import PercentLimited
from common.event_queue import IAgentEventPublisher
from common.types import AgentID, PercentLimited


class MemoryUtilizer:
def __init__(self, memory_utilization: PercentLimited):
def __init__(
self,
memory_utilization: PercentLimited,
agent_id: AgentID,
agent_event_publisher: IAgentEventPublisher,
):
self._memory_utilization = memory_utilization
self._agent_id = agent_id
self._agent_event_publisher = agent_event_publisher

def start(self):
pass
Expand Down

0 comments on commit 13e2d7b

Please sign in to comment.