Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if Cached_Data:
General.Write_Cache(Directory, Data_to_Cache, Local_Plugin_Name, "a")
else:
General.Write_Cache(Directory, Data_to_Cache, Local_Plugin_Name, "w")
elif Type_of_Query == "password":
Local_Plugin_Name = Plugin_Name + "-" + Type_of_Query
Cached_Data = General.Get_Cache(Directory, Local_Plugin_Name)
if not Cached_Data:
Cached_Data = []
for Query in Query_List:
Query_Response = pw.is_password_breached(password=Query)
logging.info(Query_Response)
if Query_Response:
Link = "https://haveibeenpwned.com/Passwords?" + Query
if Link not in Cached_Data and Link not in Data_to_Cache:
Output_file = General.Create_Query_Results_Output_File(Directory, Query, Plugin_Name, str(Query_Response), "password", ".txt")
if Output_file:
Output_Connections = General.Connections(Query, Local_Plugin_Name, "haveibeenpwned.com", "Data Leakage", Task_ID, Local_Plugin_Name.lower())
Output_Connections.Output([Output_file], Link, General.Get_Title(Link), Concat_Plugin_Name)
Data_to_Cache.append(Link)
if Cached_Data:
General.Write_Cache(Directory, Data_to_Cache, Local_Plugin_Name, "a")