forked from p15670423/monkey
Refactor ransomware payload __init__.py into ransomware_payload.py with a stubbed ransomware payload class
This commit is contained in:
parent
d7f4035884
commit
63901bcd26
|
@ -1,10 +0,0 @@
|
||||||
import logging
|
|
||||||
|
|
||||||
from infection_monkey.config import WormConfiguration
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
def start_ransomware():
|
|
||||||
LOG.info(f"Windows dir configured for encryption is {WormConfiguration.windows_dir_ransom}")
|
|
||||||
LOG.info(f"Linux dir configured for encryption is {WormConfiguration.linux_dir_ransom}")
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
import logging
|
||||||
|
|
||||||
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
class RansomewarePayload:
|
||||||
|
def __init__(self, config: dict):
|
||||||
|
self.config = config
|
||||||
|
|
||||||
|
def run_payload(self):
|
||||||
|
LOG.info(
|
||||||
|
f"Windows dir configured for encryption is " f"{self.config['windows_dir_ransom']}"
|
||||||
|
)
|
||||||
|
LOG.info(f"Linux dir configured for encryption is " f"{self.config['linux_dir_ransom']}")
|
||||||
|
|
||||||
|
file_list = self._find_files()
|
||||||
|
self._encrypt_files(file_list)
|
||||||
|
|
||||||
|
def _find_files(self):
|
||||||
|
return []
|
||||||
|
|
||||||
|
def _encrypt_files(self, file_list):
|
||||||
|
for file in file_list:
|
||||||
|
self._encrypt_file(file)
|
||||||
|
|
||||||
|
def _encrypt_file(self, file):
|
||||||
|
pass
|
Loading…
Reference in New Issue