pycdc icon indicating copy to clipboard operation
pycdc copied to clipboard

Unknown opcode: BEFORE_WITH

Open matthewransley opened this issue 2 years ago • 5 comments

In 3.11, BEFORE_WITH opcode was added, see: https://docs.python.org/3/library/dis.html#opcode-BEFORE_WITH, and it appears as though this project doesnt support it just yet

matthewransley avatar Oct 25 '23 14:10 matthewransley

there are dozens of other non-supported yet opcodes...

Please attach your .pyc

greenozon avatar Nov 22 '23 13:11 greenozon

there are dozens of other non-supported yet opcodes...

Please attach your .pyc

Hello, I need help for this opcode too. For the pyc file please add me on tg -> imma_pro

Imma-P avatar Nov 22 '23 14:11 Imma-P

main.zip Attaching a sample pyc file with this opcode.

charlyzard avatar Dec 02 '23 09:12 charlyzard

There is some strange bytecode in your main pyc modue...

                250     LOAD_CONST                    0: None
                252     LOAD_CONST                    0: None
                254     LOAD_CONST                    0: None
                256     PRECALL                       2
                260     CALL                          2
                270     POP_TOP                       
                272     JUMP_FORWARD                  11 (to 296)

I dont understand what does it mean

here is my try to decompile your module:

import flet as ft
from pathlib import Path
from src.ui import UserInterface
from src.core.utils import resource_path
import json

def main():
    if Path(resource_path('accounts.json', True)).exists():
        pass
    else:
        with open(resource_path('accounts.json', True), 'w') as f:
            f.write(json.dumps([
                {
                    'username': 'Your Email',
                    'password': 'Your Password' }], indent = 4))
            None(None, None)
        if not None:
            pass
    ft.app(target = UserInterface, assets_dir = resource_path('assets'))

if __name__ == '__main__':
    main()
    return None

does it make any sense to you?

greenozon avatar Dec 04 '23 20:12 greenozon

Yet another (big) issue is full absence of exceptions support (it was totally changed started from modern python 3.11 - "zero-cost" exception handling.

for example above main() has exceptions in a standalone exception table that should be parsed and applied besides parsing opcodes!!!

            [Exception Table]
                b'\xc1\x0f.B\t\x03\xc2\t\x04B\r\x07\xc2\x10\x01B\r\x07'

greenozon avatar Dec 04 '23 20:12 greenozon

Duplicate #452

zrax avatar Feb 21 '24 22:02 zrax