def get_data(self, filename): if filename.startswith('pocsuite://') and self.data: if not is_pocsuite3_poc(self.data): data = multiple_replace(self.data, POC_IMPORTDICT) else: data = self.data else: with open(filename, encoding='utf-8') as f: code = f.read() if not is_pocsuite3_poc(code): data = multiple_replace(code, POC_IMPORTDICT) else: data = code return data
def check_poc(poc): return is_pocsuite3_poc(poc)