NFLmusic库文件

This commit is contained in:
2025-01-23 16:47:37 +08:00
parent 7516e1c95d
commit 9b3f1d1654
54 changed files with 3763 additions and 0 deletions

25
nflmusic/obfuscation.py Normal file
View File

@ -0,0 +1,25 @@
import hashlib
import json
def hash_filename(filename):
hash_object = hashlib.sha256(filename.encode())
hex_dig = hash_object.hexdigest()
return hex_dig
if __name__ == "__main__":
hashed_files = {}
while True:
string_input = input("请输入字符串(输入'退出'退出循环):")
if string_input == "退出":
break
hashed_name = hash_filename(string_input)
hashed_files[string_input] = hashed_name
json_filename = input("请输入要保存的 JSON 文件名:")
with open(json_filename, 'w') as json_file:
json.dump(hashed_files, json_file)
print(f"JSON 文件已保存为 {json_filename}")