def request_worker(url): global swap_found status,content = Core.get_web_page(url) if status: if len(content) > 0: directory = os.getcwd()+"/output" if not os.path.exists(directory): os.makedirs(directory) file_name = url.replace('/','_') log.success("[Swap] Found backup or swap and saving it as \x1B[92m"+directory+'/'+file_name+"\x1B[0m") f = open(directory+'/'+file_name,'w') f.write(content) f.close() if "DB_" in content: parsed = Core.parse_config_file(content) for item in parsed: swap_found.append(item)
def load_config(self,config): f = open(config) content = f.read() f.close() return Core.parse_config_file(content)