Git Product home page Git Product logo

Comments (4)

extremecoders-re avatar extremecoders-re commented on July 26, 2024

Without the pyc file or atleast a disassembly of the code it's hard to provide any helpful suggestions.

from pyinstxtractor.

 avatar commented on July 26, 2024

The pyc file
added to that when i try to uncompyle the PYZ extracted archieves files it just stops uncompyle6 as a whole and doesnt output neither the error nor the code

from pyinstxtractor.

extremecoders-re avatar extremecoders-re commented on July 26, 2024

This is neither a bug of pyinstxtractor or uncompyle6. If you try to disassemble the code using dis, it would fail the same way.

>>> import marshal
... import dis
... f=open('backup_decryptor.pyc','rb')
... f.seek(16)
... co=marshal.load(f)
>>> dis.dis(co)
  1           0 STORE_GLOBAL             0 (builtins)
        >>    2 STORE_GLOBAL             1 (bi)
              4 IMPORT_NAME              0 (builtins)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "c:\users\administrator\miniconda3\envs\py38\lib\dis.py", line 79, in dis
    _disassemble_recursive(x, file=file, depth=depth)
  File "c:\users\administrator\miniconda3\envs\py38\lib\dis.py", line 373, in _disassemble_recursive
    disassemble(co, file=file)
  File "c:\users\administrator\miniconda3\envs\py38\lib\dis.py", line 369, in disassemble
    _disassemble_bytes(co.co_code, lasti, co.co_varnames, co.co_names,
  File "c:\users\administrator\miniconda3\envs\py38\lib\dis.py", line 401, in _disassemble_bytes
    for instr in _get_instructions_bytes(code, varnames, names,
  File "c:\users\administrator\miniconda3\envs\py38\lib\dis.py", line 345, in _get_instructions_bytes
    argval, argrepr = _get_name_info(arg, varnames)
  File "c:\users\administrator\miniconda3\envs\py38\lib\dis.py", line 304, in _get_name_info
    argval = name_list[name_index]
IndexError: tuple index out of range

The code is quite unusual as you don't see the STORE_GLOBAL instruction right at the start when the operand stack empty.

Further, if you try to run the pyc on standard Python 3.8 in Linux it fails with a segfault.

$ python3 --version
Python 3.8.2
$ python3 backup_decryptor.pyc 
Segmentation fault (core dumped)

All of this strongly suggests that the Python interpreter which successfully "runs" this pyc uses different sets of instructions than the standard one. That is the opcodes have been changed. To decompile, you need to figure out the new opcodes, and remap them back to original after which uncompyle6 would work.

from pyinstxtractor.

 avatar commented on July 26, 2024

Thanks for that, got it now

from pyinstxtractor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.