Beispiel #1
0
 def registerPoc(self):
     pocString = multipleReplace(self.pocString, POC_IMPORTDICT)
     _, self.moduleName = filepathParser(self.pocName)
     try:
         importer = StringImporter(self.moduleName, pocString)
         importer.load_module(self.moduleName)
     except ImportError, ex:
         logger.log(CUSTOM_LOGGING.ERROR, ex)
Beispiel #2
0
def registerPyPoc(pocDict):
    pocname = pocDict.keys()[0]
    _, moduleName = filepathParser(pocname)
    try:
        importer = StringImporter(moduleName, pocDict[pocname])
        importer.load_module(moduleName)
    except ImportError, ex:
        errMsg = "%s register failed \"%s\"" % (moduleName, str(ex))
        logger.log(CUSTOM_LOGGING.ERROR, errMsg)
Beispiel #3
0
def registerPyPoc(pocDict):
    pocname = pocDict.keys()[0]
    _, moduleName = filepathParser(pocname)
    try:
        importer = StringImporter(moduleName, pocDict[pocname])
        importer.load_module(moduleName)
    except ImportError, ex:
        errMsg = "%s register failed \"%s\"" % (moduleName, str(ex))
        logger.log(CUSTOM_LOGGING.ERROR, errMsg)