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 lzma
|
||||||
import gzip
|
import gzip
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
from Crypto.Cipher import AES
|
||||||
|
from cryptography.fernet import Fernet
|
||||||
|
from Crypto.Cipher import ChaCha20
|
||||||
# 获取当前日期和时间
|
# 获取当前日期和时间
|
||||||
now = datetime.now()
|
now = datetime.now()
|
||||||
|
|
||||||
@@ -66,6 +68,11 @@ def extract_base64_encoded(data):
|
|||||||
return encoded_string
|
return encoded_string
|
||||||
|
|
||||||
|
|
||||||
|
def Encoded_script_decode(data):
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
def decrypt_nested(data):
|
def decrypt_nested(data):
|
||||||
while True:
|
while True:
|
||||||
new_data = try_decode_base64(data)
|
new_data = try_decode_base64(data)
|
||||||
@@ -74,7 +81,16 @@ def decrypt_nested(data):
|
|||||||
# print("解密后的数据:", new_data)
|
# print("解密后的数据:", new_data)
|
||||||
if "exec(" in str(new_data):
|
if "exec(" in str(new_data):
|
||||||
# 更新 decrypted_data 以便下一次循环使用
|
# 更新 decrypted_data 以便下一次循环使用
|
||||||
data = extract_base64_encoded(str(new_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)
|
# print(data)
|
||||||
else:
|
else:
|
||||||
print("无法进一步解密,退出循环")
|
print("无法进一步解密,退出循环")
|
||||||
@@ -83,15 +99,15 @@ def decrypt_nested(data):
|
|||||||
return new_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()
|
content = file.read().strip()
|
||||||
# 打印内容
|
# 打印内容
|
||||||
encoded_data = extract_base64_encoded(content)
|
encoded_data = extract_base64_encoded(content)
|
||||||
#print(encoded_data)
|
# print(encoded_data)
|
||||||
# 解密嵌套加密数据
|
# 解密嵌套加密数据
|
||||||
final_decrypted_data = decrypt_nested(encoded_data)
|
final_decrypted_data = decrypt_nested(encoded_data)
|
||||||
# 输出最终解密结果
|
# 输出最终解密结果
|
||||||
#print("最终解密结果:")
|
# print("最终解密结果:")
|
||||||
with open("./onput.py", 'wb') as f:
|
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