예제 #1
0
 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
예제 #2
0
 def check_poc(poc):
     return is_pocsuite3_poc(poc)