mirror of
https://github.com/smallfawn/decode_action.git
synced 2025-12-20 00:35:19 +08:00
Update decode.py
This commit is contained in:
@@ -4,7 +4,9 @@ import zlib
|
||||
import lzma
|
||||
import gzip
|
||||
from datetime import datetime
|
||||
|
||||
from Crypto.Cipher import AES
|
||||
from cryptography.fernet import Fernet
|
||||
from Crypto.Cipher import ChaCha20
|
||||
# 获取当前日期和时间
|
||||
now = datetime.now()
|
||||
|
||||
@@ -66,6 +68,11 @@ def extract_base64_encoded(data):
|
||||
return encoded_string
|
||||
|
||||
|
||||
def Encoded_script_decode(data):
|
||||
|
||||
return
|
||||
|
||||
|
||||
def decrypt_nested(data):
|
||||
while True:
|
||||
new_data = try_decode_base64(data)
|
||||
@@ -74,7 +81,16 @@ def decrypt_nested(data):
|
||||
# print("解密后的数据:", new_data)
|
||||
if "exec(" in str(new_data):
|
||||
# 更新 decrypted_data 以便下一次循环使用
|
||||
if "Encoded script" in str(new_data):
|
||||
new_data = "该加密未适配 敬请期待"
|
||||
print("该加密未适配 敬请期待")
|
||||
break
|
||||
elif "exec(" in str(new_data):
|
||||
data = extract_base64_encoded(str(new_data))
|
||||
else:
|
||||
print("未知 加密 无法进一步解密")
|
||||
new_data = "未知 加密 无法进一步解密"
|
||||
break # 如果 new_data 中不再包含 "exec",跳出循环
|
||||
# print(data)
|
||||
else:
|
||||
print("无法进一步解密,退出循环")
|
||||
@@ -83,15 +99,15 @@ def decrypt_nested(data):
|
||||
return new_data # 返回最终解密后的数据
|
||||
|
||||
|
||||
with open('./input.py', 'r') as file:
|
||||
with open('./input.py', 'r', encoding='utf-8') as file:
|
||||
# 读取文件内容
|
||||
content = file.read().strip()
|
||||
# 打印内容
|
||||
encoded_data = extract_base64_encoded(content)
|
||||
#print(encoded_data)
|
||||
# print(encoded_data)
|
||||
# 解密嵌套加密数据
|
||||
final_decrypted_data = decrypt_nested(encoded_data)
|
||||
# 输出最终解密结果
|
||||
#print("最终解密结果:")
|
||||
# print("最终解密结果:")
|
||||
with open("./onput.py", 'wb') as f:
|
||||
f.write(final_decrypted_data)
|
||||
f.write(final_decrypted_data.encode('utf-8'))
|
||||
|
||||
Reference in New Issue
Block a user