-1

Thank you for your attention, I have a pyc file and I need to get its source code, I have already tried many libraries, but there are errors with the version,

Here is the command line output when trying to decompile:

C:\Users\nigga22nd\Downloads>uncompyle6 bot.pyc
# uncompyle6 version 3.8.0
# Python bytecode 3.10.0 (3439)
# Decompiled from: Python 3.8.10 (tags/v3.8.10:3d8993a, May
MSC v.1928 64 bit (AMD64)]
# Embedded file name: bot.py
# Compiled at: 2022-02-19 13:03:49
# Size of source mod 2**32: 68797 bytes

Unsupported Python version, 3.10.0, for decompilation


# Unsupported bytecode in file bot.pyc
# Unsupported Python version, 3.10.0, for decompilation

Here is the file itself if anyone can help: https://dropmefiles.com/1rVNb I really need the source code.

Charles Duffy
  • 280,126
  • 43
  • 390
  • 441
artem22nd
  • 17
  • 1
  • 4
  • 1
    The error message says _exactly_ what the problem is -- the version of uncompyle6 you're using doesn't support Python 3.10. – Charles Duffy Mar 06 '22 at 14:07
  • 1
    BTW, "snippets" are only for HTML, JavaScript and CSS. Other languages should be formatted with the `{}` button in the editor. – Charles Duffy Mar 06 '22 at 14:07
  • And read https://pypi.org/project/uncompyle6/ -- it doesn't even **claim** to support any version of Python newer than 3.8; so of course a pip-installed release won't work for this. – Charles Duffy Mar 06 '22 at 14:09
  • 2
    Moreover, there are lots of people _asking_ for Python 3.9 and 3.10 support, but nobody _funding_ that support, and the developer is tired of working for free. See https://github.com/rocky/python-uncompyle6/issues/384, https://github.com/rocky/python-uncompyle6/issues/353, etc. – Charles Duffy Mar 06 '22 at 14:12
  • 2
    @CharlesDuffy thanks for the kind words. One small correction. I do open source work for free and will continue to do so. Unwittingly, I stumbled into an area where there tons of people doing not quite legitimate kinds of activity (such as here) and who expect others to help them and join them in their social malfeasance if not illegal activity. It is the Internet equivalent of beggars in Bombay. It is amazing how adding a fee of $5K reduces the noise I have to put up with. – rocky Mar 10 '22 at 08:49
  • @rocky, I absolutely understand -- I've been lucky(?) enough to not have any of my projects get the prominence yours have; and the balance behind having created something important and having one's work validated vs being tied to that prior project and unable to go on to something new is one I'm not sure I would navigate well. Please accept my apologies for the overly-pithy summary. – Charles Duffy Mar 10 '22 at 15:24
  • 1
    @rocky, ...incidentally, uncompyle6 has been handy to me personally -- at one point with a now-former day-job hat on, I ended up building a package for an internal piece of proprietary software (for which the team responsible was keeping source closely held for reasons that are out-of-scope here) that, as part of the build process, would unpackage it and apply a few patches -- supporting that was the origin of https://github.com/charles-dyfis-net/pydeinstaller. Thank you for your work! – Charles Duffy Mar 10 '22 at 15:26
  • @CharlesDuffy FYI I just added a mention to pydeinstaller in the README for uncompyle6 (and will probably do the same for decompyle3 soon). See https://github.com/rocky/python-uncompyle6/commit/aaa737672b969b7adfc530e2911f562813d4b51b I am appreciative of all the work volunteered by the open-source community. Over time this supply has been dwindling. – rocky Mar 12 '22 at 09:59

1 Answers1

4

As of this writing, no existing version of uncompyle6 works for Python 3.9 or 3.10 (and your bytecode is built for 3.10).

See feedback from the developer on this topic in the below tickets:

Also, for another Python decompiler from the same author:

Consider settling for a disassembler instead of a decompiler.

Charles Duffy
  • 280,126
  • 43
  • 390
  • 441
  • Thanks. how to use a disassembler? so I can get the code of this file? I'm just not very good at it all, if you can easily get it from this file source code – artem22nd Mar 06 '22 at 16:37
  • If you can help me I will be very grateful – artem22nd Mar 06 '22 at 16:43
  • 1
    Pay the author of pydecompyler the $5000 he's asking for and wait however long it takes for him to write a new version. – Charles Duffy Mar 06 '22 at 17:05
  • That said, _why_ do you need source code? If you just want to read what it's doing, you can use a disassembler for that, you don't need a full decompiler. – Charles Duffy Mar 06 '22 at 17:09
  • Yes, I just need the code of this file, and then I will create my own bot using that code, can you help me? – artem22nd Mar 06 '22 at 17:29