# Fixes Layla #Author: Gustav0_ and SilentNightSound # ################################################################################ # ......... # :+#%@@@@@@%%@@%#+-. # .. =%@@@%@*##*##*%#%@@@@@@@+-*: # .**%@@@@@@%*+*%@#*+#%@@@@@@@@@#*##:. # .*%#@@@@@@@@@@%##%@@@@@@@@@@#*+#*#%*#- # :=###@@@@*+*##+###@@*-=++++*#@****####%*+. # .++###@@*#@@@@@@%+#*+@@@@@@@@@#=@+###*#%*#@#: # .++##*@#+=-==+*%@@+#@@@@@@@@%+*%=###+##%:..:*=. # .:+=#*@+-:-=*###+*@@#+++==**=--=%##+###::::+:** # .:.-=++:+@@@@@@%*+*#@%##%@@@@@@@%==*##-.:+=+#::@= # :@@@@@@@@@@@%*#%#%@@@@@@@@%##%@@@@@%##**#+-*+*:##. # -@@@@@@@@%*@@@#@@@@@@@@@@@@@@%*%@@@@@@@*-:*::.*- # .-++#@@@@##@@@#%@@@@@@@@@@@@@@@@%+%@@@%#-#@=.:.-. # .+%@@@@@@**@@@@#@@@@@@@@@@@@@@@@@@@%#@@@@@**@@+.. # :#@@@@@@@##@@@@%#@@@@@@@@@@@@@@@@@@@@%*@@@@@#*@@%. # .%@@@@@@@*%@@@@@%%@@@@@@@@@@@@@@@@@@%@@@*@@@@@*#@@#. # :%@@@@@###@@@@@@@%%@@@@@@@%@%@@@@@@@@@@@@%#@@@@@*%@@= # .*@@@@@#*@@@%@@@@@%#@@@@@@@@@%@@@@@@@@@@@@@##@@@@@*%@*. # -%@@@@@@@%##*@@@@@%#@@@@@@@@%*@@@@@@@@@@@@@%+@@@@@%*@#. # .+@@@@@@@@@@%+@@@@@@#@@@%@@@@#-#@@%%@@@@@@@@@**@@@@@#+*: # .#@@@@@@@@@@%=*@@@@@#%@@@@@@@-%=%@@*%@@@@@@@@@=%@@@@@@*:. # :@@@@@@@@@@@*#*#@@@@@*@@@@@%=@@@=#@%*@@%@@@@@@%#%*#%@@@@@- # .-@@@@@%@@@@@#+##+%@@@@##@@@%+****#+#@**@@#%@@@@@##@@%#===-. # .-*%@@@@%*%@@@@+%@@@%+#@@@@#%@*+@@@@@@@#+@*%@@%+%@@@@*#@@@@+=++. # =**==*#%@@@#*@@%#+#+%+%@@@*==@@####%%@@**#@@@@%=*%@@@*#@@%++++-. # .*%#@@%#+=%=:----+*#%*%@@*%@@%=-=--:-=**@@@@@+%@%%%%@%%%%: # .+%%%%%%%@*--*+*-==*%*@%*+#%#%:=--++*%=:+@@@@@*%%%@%%%%####. # .:+*##%%*+@+--%@++=#++%=++%#=%@%==**=*+@*==@@@@@*@%+++*++**+++-.. # :---****##%+-+@@%++++*@=-=---*@@*+-=*+*@===@@@@%*@@*=*++**-::-::. # ... *%--+%@#++#@#-#@%*-*@@@=-=-*@#---@@@@*=%@@*++=. # :@#-=%@%%@%+-#@@@@#:+@@@@@@@#:--=%%@#-+=::-:+++: # -%#:---==+#@@%###@@*--+*+=---==+%%*-+=: # :#=-+=.-=+*%%@@@@@%%*=-:-=+===##-:+++=. # :-:. .:--:..:-:::::=*+-.-*=. ... # -%@#*:===:++=@@@#=.:=*: # :%@#=:-+=----%@@@@#:.=%%. # :+++===:.::=-===+*%@===@@= # .:#%-=--::.-=-=+#*+==-+=#@+ # .-#%@%+:::::+%#+##-=:.**-@+ # .@@@@@#:::.+@@@@@====.*#+**. # ..=%%%*==::==*@@@@*:--:-*+%%: # .=*+++++=++++++=++-==---+:#@@#=. # .+******+-=******=::=*%%=. # ...::.:==-=+*+------=***-*@@@@%.::.... # .-+*******-.-----:...:----=--+-::::-******+: # ..:-==+*+=-=+*****+===-::=***++==-:.. # ################################################################################ import os old_to_new_hashes = { #Layla 'bafaa0e8': '72f035f8', # blend } def replace_hashes_in_ini_files(path, old_to_new_hashes): for root, dirs, files in os.walk(path): for filename in files: if filename.lower() != 'desktop.ini' and filename.endswith('.ini'): filepath = os.path.join(root, filename) try: with open(filepath, 'r', encoding='utf-8') as f: s = f.read() if any(old in s or new in s for old, new in old_to_new_hashes.items()): print(f"Processing: {filepath}") found_old_hashes = False found_new_hashes = False for old, new in old_to_new_hashes.items(): if old in s: found_old_hashes = True s = s.replace(old, new) print(f" Found {old} ------> Match! Hash Updated to {new}!") elif new in s: found_new_hashes = True print(f" Found {new} ------> Already updated for 4.4 and 4.5") if found_old_hashes: with open(filepath, 'w', encoding='utf-8') as f: f.write(s) print(f" File has been modified!") elif found_new_hashes: print(f" File is Already Updated.") except Exception as e: print(f"Error processing file '{filepath}': {e}") continue if __name__ == "__main__": path = os.getcwd() replace_hashes_in_ini_files(path, old_to_new_hashes) input("Enter to Exit...")