-
Notifications
You must be signed in to change notification settings - Fork 786
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #3119 PR #??
- Loading branch information
Showing
6 changed files
with
22 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 6 additions & 3 deletions
9
monkey/infection_monkey/payload/ransomware/ransomware_payload.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
from typing import Dict | ||
|
||
from common.event_queue import IAgentEventQueue | ||
from common.types import Event | ||
from common.types import AgentID, Event | ||
from infection_monkey.payload.i_payload import IPayload | ||
|
||
from . import ransomware_builder | ||
|
||
|
||
class RansomwarePayload(IPayload): | ||
def __init__(self, agent_event_queue: IAgentEventQueue): | ||
def __init__(self, agent_event_queue: IAgentEventQueue, agent_id: AgentID): | ||
self._agent_event_queue = agent_event_queue | ||
self._agent_id = agent_id | ||
|
||
def run(self, options: Dict, interrupt: Event): | ||
ransomware = ransomware_builder.build_ransomware(options, self._agent_event_queue) | ||
ransomware = ransomware_builder.build_ransomware( | ||
options, self._agent_event_queue, self._agent_id | ||
) | ||
ransomware.run(interrupt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters