fix: 修复Uncomply反编译报错
This commit is contained in:
parent
3f6375977c
commit
cd779ef43f
@ -1,5 +1,4 @@
|
||||
from typing import List, Tuple
|
||||
import uncompyle6
|
||||
import io
|
||||
import os
|
||||
import subprocess
|
||||
@ -39,11 +38,7 @@ def disassemble_pyc(file_path: str, pycdc_addr=None) -> str:
|
||||
str: The disassembled code as a string.
|
||||
"""
|
||||
output = io.StringIO()
|
||||
try:
|
||||
uncompyle6.main.decompile_file(file_path, output)
|
||||
return output.getvalue()
|
||||
except Exception as e:
|
||||
if pycdc_addr is None:
|
||||
return "none"
|
||||
else:
|
||||
return run_pycdc(pycdc_addr, file_path)
|
||||
if pycdc_addr is None:
|
||||
return "none"
|
||||
else:
|
||||
return run_pycdc(pycdc_addr, file_path)
|
||||
|
@ -3,6 +3,5 @@ requests
|
||||
packaging
|
||||
openai
|
||||
bs4
|
||||
uncompyle6
|
||||
colorama
|
||||
tqdm
|
Loading…
x
Reference in New Issue
Block a user