def __init__(self): self.arch = 'linux-x64-lsb' self.hostname = "unitTest" self.pckl = pickle.load( open(CONFIG.get('honeypot', 'filesystem_file'), 'rb')) self.fs = fs.HoneyPotFilesystem(copy.deepcopy(self.pckl), 'arch') self.process = None
def __init__(self, cfg): self.cfg = cfg self.hostname = "unitTest" self.pckl = pickle.load( open(cfg.get('honeypot', 'filesystem_file'), 'rb')) self.fs = fs.HoneyPotFilesystem(copy.deepcopy(self.pckl), self.cfg)
def initFileSystem(self): """ Do this so we can trigger it later. Not all sessions need file system """ self.fs = fs.HoneyPotFilesystem(copy.deepcopy(fs.PICKLE), self.arch) try: self.process = self.getCommandOutput(CONFIG.get('shell', 'processes'))['command']['ps'] except NoOptionError: self.process = None
def initFileSystem(self, home): """ Do this so we can trigger it later. Not all sessions need file system """ self.fs = fs.HoneyPotFilesystem(None, self.arch, home) try: self.process = self.getCommandOutput(CowrieConfig().get('shell', 'processes'))['command']['ps'] except NoOptionError: self.process = None
def initFileSystem(self, home): """ Do this so we can trigger it later. Not all sessions need file system """ self.fs = fs.HoneyPotFilesystem(self.arch, home) try: self.process = self.getCommandOutput( CowrieConfig.get("shell", "processes"))["command"]["ps"] except NoOptionError: self.process = None
def __init__(self): self.arch = "linux-x64-lsb" self.hostname = "unitTest" self.fs = fs.HoneyPotFilesystem("arch", "/root") self.process = None
def __init__(self): self.arch = 'linux-x64-lsb' self.hostname = "unitTest" self.fs = fs.HoneyPotFilesystem(None, 'arch') self.process = None
def initFileSystem(self): """ Do this so we can trigger it later. Not all sessions need file system """ self.fs = fs.HoneyPotFilesystem(copy.deepcopy(fs.PICKLE))
def __init__(self, realm): self.cfg = realm.cfg self.avatars = [] self.hostname = self.cfg.get('honeypot', 'hostname') self.fs = fs.HoneyPotFilesystem(copy.deepcopy(fs.PICKLE),self.cfg)