Git Product home page Git Product logo

Comments (5)

neil-orans avatar neil-orans commented on August 26, 2024

Hey @mrihtar - Can you share the binary that caused the UnicodeEncodeError? Or the full traceback?

from pydecipher.

dperret avatar dperret commented on August 26, 2024

The suggested fix looks straight forward enough, but it would be good to reproduce the problem before trying to fix it. @mrihtar as @neil-orans suggested, if you can share a binary or even the hash of a binary (more than one would be even better) that we can download from VirusTotal that will cause the UnicodeEncodeError, that would be very helpful so that we can reproduce the problem, and also verify that the update actually fixes it.

from pydecipher.

mrihtar avatar mrihtar commented on August 26, 2024

I've uploaded the binary to VirusTotal, hash 6831bcc0f71ad753a0d829a95fbdc55ea392830cd9a999052362bc6d42fc3d67
At the moment I don't have other binaries. Binary was built with pyinstaller 4.4 (on python 3.9.4) and unpacked with pydecipher 1.0.0, which without the suggested fix fails like this:

Traceback (most recent call last):
  File "C:\Python39\Lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Python39\Lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Python39\Scripts\pydecipher.exe\__main__.py", line 7, in <module>
  File "C:\Python39\lib\site-packages\pydecipher\main.py", line 259, in run
    log_file_ptr.write(log_stream.getvalue())
  File "C:\Python39\Lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u0230' in position 1238: character maps to <undefined>

from pydecipher.

dperret avatar dperret commented on August 26, 2024

Thanks for sharing that file. I am not getting that error when testing within docker containers built from the python:3.9.2 or python:3.9.6 docker images. I'll try to set up a Windows test environment to see if I can reproduce the error there. Are you using Windows 10 with python 3.9.4? Also, what versions of python-xdis and uncompyle6 are you using?

Based on the testing I've done so far, even without the UnicodeEncodeError, unfreezing this file might also require some updates to uncompyle6 and/or xdis rocky/python-uncompyle6#355 rocky/python-uncompyle6#353 rocky/python-uncompyle6#331

from pydecipher.

mrihtar avatar mrihtar commented on August 26, 2024

I am using Windows 10 21H1, python 3.9.6 x64 (just updated), xdis 5.0.11 and uncompyle6 3.7.4. I have also environment variable PYTHONIOENCODING=utf-8 . With this setup I am still getting this error, but not with my fix.

Regarding your second remark: for the final decompile (from .pyc) I am using pycdc (manually).

from pydecipher.

Related Issues (5)

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.