Code Monkey home page Code Monkey logo

Comments (6)

CensoredUsername avatar CensoredUsername commented on August 9, 2024 1

I want to apologize, I'm unfamiliar with github and did not know that it was possible to look at the closed issues report posts. I should have done more tries and research before complaining.

No problem, you left a very detailed bug report that I could easily work with, that is much more than most people do ;)

from unrpyc.

CensoredUsername avatar CensoredUsername commented on August 9, 2024

Heya. Based on your description you've ran into a game which has altered the rpyc file format in some way to not match the normal ren'py file format. The errors are accurate, unrpyc cannot read this file.

Well except for the folloiwng:

I also tried with "python unrpyc.py --try-harder (file location)" which gives the following error : " line 213, in
if not all(ord(i) >= 0x20 and ord(i) < 0x80 for i in count.keys()):
TypeError: ord() expected string of length 1, but int found

This is a deobfuscation bug introduced with the python 3 transition, we can fix that and possibly it'll be able to decode it.

But otherwise, you'll have to figure out what the game is doing that is different from ren'py. We can unfortunately not support whatever file format changes people make to their own games.

They seem to have been thorough though, even blocking normal rpy files (un.rpy) as well as the bytecode injection (just checking, it was called bytecode-3.9.rpyb when you put it in there right?

from unrpyc.

CensoredUsername avatar CensoredUsername commented on August 9, 2024

I've pushed an update (and included in the new release) a fix to the issue you encountered with deobfuscation. You can give that a try, it might work.

from unrpyc.

LatLichy avatar LatLichy commented on August 9, 2024

Thanks for your response.

I downloaded the update and tried again, and it still doesn't work, but the error messages are a bit more precise this time it seems :

When I use the line "python unrpyc.py (file location)", the error is now : "\unrpyc-master\unrpyc.py", line 138, in read_ast_from_file
raise BadRpycException(
BadRpycException: Did not find a zlib compressed blob where it was expected. Either the header has been modified or the file structure has been changed. File header: b'RENPY RPC2\x01\x00\x00\x00.\x00\x00\x00F9\x00\x00\x02\x00\x00\x00t9\x00\x00\x9bP\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4G.Q'

Unrpyc v2.0.2 results summary:

Processed 1 file.

0 files were successfully decompiled.
1 file did not have the correct header, these were ignored.

To attempt to bypass modifications to the file header, use the --try-harder flag."

As for when I use the line "python unrpyc.py --try-harder (file location)", the error is now : "\unrpyc-master\deobfuscate.py", line 345, in try_decrypt_section
raise ValueError("\n".join(diagnosis))
ValueError: Did not know how to decrypt data.

During handling of the above exception, another exception occurred:"

and : "\unrpyc-master\deobfuscate.py", line 307, in read_ast
diagnosis.append(e.message)
AttributeError: 'ValueError' object has no attribute 'message'


Unrpyc v2.0.2 results summary:

Processed 1 file.

0 files were successfully decompiled.
1 file failed to decompile due to errors."

I also tried the other method one more time, by replacing the "bytecode" file in the "game\cache" folder of the game (and indeed calling it "bytecode-39.rpyb", like the file is called on the github), and the result is the same as before; the game can launch, but no decompilation occurs.

Putting the "un.rpy" file into the "game" folder, then launching the game, still result in the game not being able to start, giving the following error message in a text traceback file : "File "game/un.rpy", line 1, in
python early hide:
File "game/un.rpy", line 30, in _execute_python_hide
bindata = renpy.game.script.read_rpyc_data(file, 1)
AttributeError: 'Script' object has no attribute 'read_rpyc_data'",

And doing the same with the "un.rpyc" file still prevent the game from running as well, saying that this file apparently could not load.

I understand that the rpyc files from this game can't be opened with unrpyc, and still appreciated your help.

Too bad, but thanks a lot anyway

from unrpyc.

CensoredUsername avatar CensoredUsername commented on August 9, 2024

AttributeError: 'Script' object has no attribute 'read_rpyc_data'",

Hmm, you might have a duplicate of #217 on your hands

from unrpyc.

LatLichy avatar LatLichy commented on August 9, 2024

Indeed. I looked at your link and read everything. I tried to edit the code of the "un.rpy" file to replace the function name "read_rpyc_data" by "read_lidl_discount_data", like you said on the post, and it worked for me as well. Placing the "un.rpy" file in the "game" folder of the game, then launching the game, now works. The game is able to start, and everything is decompiled.
I'm able to do what I want now.

I want to apologize, I'm unfamiliar with github and did not know that it was possible to look at the closed issues report posts. I should have done more tries and research before complaining.

I'm still grateful that you responded and helped me.

Thanks you!

from unrpyc.

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.