zrax / pycdc

C++ python bytecode disassembler and decompiler
GNU General Public License v3.0
3.32k stars 641 forks source link

Unsupported Node type: 12 #408

Open gagmeng opened 11 months ago

gagmeng commented 11 months ago

`pycdc.exe main_window.pyc Source Generated with Decompyle++ File: main_window.pyc (Python 3.9) Author: qianye Date: 2023-07-13 17:18:55 LastEditTime: 2023-11-15 08:17:46 Description: Software: Visual Studio Code

import hashlib import json import os import platform import sys import traceback import urllib.request as urllib from datetime import datetime from urllib.parse import quote import magneturi import rsa from PyQt5.QtCore import QMutex, Qt, QTimer, QUrl from PyQt5.QtGui import QCursor, QDesktopServices, QIcon from PyQt5.QtWidgets import QApplication, QDialog, QSystemTrayIcon from qfluentwidgets import Action, DotInfoBadge from qfluentwidgets import FluentIcon as FIF from qfluentwidgets import FluentWindow, InfoBadgePosition, InfoBar, InfoBarIcon, InfoBarPosition, MenuAnimationType, MessageBox, NavigationItemPosition, PopupTeachingTip, PushButton, RoundMenu, SystemTrayMenu, TeachingTipTailPosition, TeachingTipView import resource_rc from common import encrypt from common.config import APP_NAME, BUY_VIP_URL, CHECK_UPDATE_URL, RELEASE_URL, VERSION, cfg, mysettings from common.custom_components import CustomDialog, LoadingBox, MyInfoBar, MyMessageBox, NavigationAvatarWidget, MyFluentIcon from common.signal_bus import signalBus from common.singleton import Singleton from common.subthread import * from common.token_manager import token_manger from about_interface import AboutInterface from activate_dialog import ActivateDialog from activation_dialog import ActivationDialog from aria2_dialog import Aria2Dialog from bitcomet_dialog import BitcometDialog from connect_dialog import ConnectDialog from database_dialog import DataBaseDialog from exception_dialog import ExceptionDialog from file_interface import FileInterface from invite_interface import InviteInterface from lixian_dialog import LixianDialog from lixian_interface import LixianInterface from magnet_interface import MagnetInterface from profile_info import ProfileInfoCard from recent_interface import RecentInterface from setting_interface import SettingInterface from share_interface import ShareInterface from star_interface import StarInterface from switch_account_dialog import SwitchAccountDialog from tide_interface import TideInterface from transdetail_dialog import TransDialog from trash_interface import TrashInterface from upload_interface import UploadInterface from viewmagnet_dialog import ViewMagnetDialog if sys.platform == 'win32': import winreg elif sys.platform == 'darwin': import AppKit NSApplicationActivationPolicyRegular = 0 NSApplicationActivationPolicyAccessory = 1 NSApplicationActivationPolicyProhibited = 2 MainWindow = Singleton(Unsupported Node type: 12 )` Attach file: main_window.pyc.zip

greenozon commented 11 months ago

took a look, this is very strange case... - not type 12 means ASTNode::NODE_CLASS here is my draft try ... Debug.zip

greenozon commented 11 months ago

@gagmeng if that looks good I could submit a PR...

gagmeng commented 11 months ago

@gagmeng if that looks good I could submit a PR...

The decompilation results after the fix look fantastic.