Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported opcode: MAKE_CELL #510

Open
yeqiu6080 opened this issue Aug 13, 2024 · 3 comments
Open

Unsupported opcode: MAKE_CELL #510

yeqiu6080 opened this issue Aug 13, 2024 · 3 comments

Comments

@yeqiu6080
Copy link

pycdc V0.4.pyc

Source Generated with Decompyle++

File: V0.4.pyc (Python 3.11)

import requests
from bs4 import BeautifulSoup
import logging
import re
import time
from requests.exceptions import RequestException
import os
import threading
from queue import Queue
from tqdm import tqdm
from cn2an import transform
MAX_THREADS = 2
logging.basicConfig(level = logging.INFO, format = '%(asctime)s - %(levelname)s - %(message)s')

def fix_publisher(text):
text = re.sub('

', '', text)
text = re.sub('<!--\?xml.?>', '', text)
text = re.sub('<link .
?/>', '', text)
text = re.sub('<meta .?/>', '', text)
text = re.sub('<h1 .
?>', '', text)
text = re.sub('
', '', text)
text = re.sub('<!DOCTYPE html .?>', '', text)
text = re.sub('<span .
?>', '', text)
text = re.sub('<html .*?>', '', text)
return text

def chinese_to_number(chinese_num_str):
string_num = transform(chinese_num_str)
result_num = int(string_num)
return result_num

def extract_chapter_number(filename):
match = re.search('绗?Unsupported opcode: MAKE_CELL
imageV0.4.zip

@wilson0x4d
Copy link

I have similar problems with multiple opcodes over different pycfiles, in one case the "Unsupported opcode" isn't even used in the pyc anywhere (confirmed in a hex editor), and it's always an opcode that is supported (exists in ASTree.cpp and should not be falling through into default: case which prints this message.)

This issue has actually rendered the pycdc tool itself unreliable for me (sometimes it works, sometimes it doesn't).

What is interesting is in every case this occurs the pycdas tool works correctly and does not emit any <INVALID> entries, as a result I have stopped using pycdc in favor of pycdas since the disassembler always works correctly.

Seems like a bug. I believe a similar report has been made by other users recently:

..because I can't publicly share any of my test inputs where I have observed this I have hesitated to file a bug, but it seems it's not just me running into whatever this is.

Seems like an AST bug.

@wilson0x4d
Copy link

#511 should correct the error message users are seeing, but root cause is unimplemented opcodes which the PR does not address.

@ghost
Copy link

ghost commented Sep 4, 2024

I have a script that fails with MAKE_CELL too. Here is a script in case anyone wanna take a look. it's based on Py 3.11
script.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants