def sanityChecks(self, cliargs): passed = HSN2Service.sanityChecks(self, cliargs) if path.isdir(cliargs.nugget): logging.error("'%s' is a directory" % cliargs.nugget) passed = False if not access(cliargs.nugget, X_OK): logging.error("'%s' isn't executable or does not exist!" % cliargs.nugget) passed = False if not path.isabs(cliargs.inputmapping): cliargs.inputmapping = self.mappings + cliargs.inputmapping if path.isdir(cliargs.inputmapping): logging.error("'%s' is a directory" % cliargs.inputmapping) passed = False elif not path.isfile(cliargs.inputmapping): logging.error("'%s' does not exist!" % cliargs.inputmapping) passed = False if not path.isabs(cliargs.outputmapping): cliargs.outputmapping = self.mappings + cliargs.outputmapping if path.isdir(cliargs.outputmapping): logging.error("'%s' is a directory" % cliargs.outputmapping) passed = False elif not path.isfile(cliargs.outputmapping): logging.error("'%s' does not exist!" % cliargs.outputmapping) passed = False if passed is True: cliargs.inputmapping = self.importMapping(cliargs.inputmapping) cliargs.outputmapping = self.importMapping(cliargs.outputmapping) if cliargs.inputmapping is None or cliargs.outputmapping is None: passed = False return passed
def sanityChecks(self, cliargs): passed = HSN2Service.sanityChecks(self, cliargs) try: import yara except ImportError: passed = False return passed
def sanityChecks(self, cliargs): passed = HSN2Service.sanityChecks(self, cliargs) if not path.isdir(cliargs.cuckoo): logging.error("'%s' is not a dir" % cliargs.cuckoo) passed = False else: if not path.isfile(path.join(cliargs.cuckoo, "cuckoo.py")): logging.error("'%s' is not a file" % path.join(cliargs.cuckoo, "cuckoo.py")) passed = False return passed
def sanityChecks(self, cliargs): passed = HSN2Service.sanityChecks(self, cliargs) if not path.isfile(cliargs.thug): logging.error("'%s' is not a file" % cliargs.thug) passed = False return passed
def sanityChecks(self, cliargs): return HSN2Service.sanityChecks(self, cliargs)