From cd779ef43f80cbcb013ab2c082cf6f89b80ca681 Mon Sep 17 00:00:00 2001 From: dqy <1016751306@qq.com> Date: Tue, 4 Jun 2024 16:14:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DUncomply=E5=8F=8D?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- detection/pyc_detection.py | 13 ++++--------- requirements.txt | 1 - setup.py | 1 - 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/detection/pyc_detection.py b/detection/pyc_detection.py index d350421..b5fe390 100644 --- a/detection/pyc_detection.py +++ b/detection/pyc_detection.py @@ -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) diff --git a/requirements.txt b/requirements.txt index 4392d2a..4635d41 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,6 +3,5 @@ requests packaging openai bs4 -uncompyle6 colorama tqdm \ No newline at end of file diff --git a/setup.py b/setup.py index ebd49a5..92cdd19 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,6 @@ setup( "packaging", "openai", "bs4", - "uncompyle6", "tqdm", "colorama", ],