Code Monkey home page Code Monkey logo

Comments (6)

brappier avatar brappier commented on August 12, 2024

https://github.com/extremecoders-re/pyinstxtractor/wiki/Replacing-files-inside-the-CArchive

In this article, the new file has to be less than the old one.
what to do if the new file is more in size??

from pyinstxtractor.

extremecoders-re avatar extremecoders-re commented on August 12, 2024

Will that violate any checksums or anything?

There no checksums used anywhere in pyinstaller.

In this article, the new file has to be less than the old one.
what to do if the new file is more in size??

If the new file is larger in size than the older it implies all other files which are located after that file have to be shifted. As a result, the table of contents of the CArchive has to be updated with the new offsets for all the affected files.

from pyinstxtractor.

brappier avatar brappier commented on August 12, 2024

Yes, I shifted everything properly and I updated the TOC also the Cookie.

The patched program does not execute properly. I get killed as soon as i run the program.
The thing is that the position of the cookie is also updated, but I dont know there the offset of the cookie is stored, so that is not updated, hence maybe that is why it does not execute.

As a sanity check i ran pyinstxtractor.py on the pathced file, and it is able to extract everything without any error. so i have updated all offsets etc ( which are mentioned in your script ) properly.

Also, I am on a mac.

from pyinstxtractor.

brappier avatar brappier commented on August 12, 2024

I think there is some content in the tail which has to be updated, idk what all though.

from pyinstxtractor.

extremecoders-re avatar extremecoders-re commented on August 12, 2024

I see. Mac is tricky. If you go through the pyinstaller source, it requires signing the executable. The modifications invalidates the signature and could be the reason why the process gets killed immediately.

https://github.com/pyinstaller/pyinstaller/blob/779a94968ecc55e0cc23ea89cb3b6523e7cff576/PyInstaller/building/api.py#L785-L806

https://github.com/pyinstaller/pyinstaller/blob/779a94968ecc55e0cc23ea89cb3b6523e7cff576/PyInstaller/building/api.py#L822-L845

from pyinstxtractor.

brappier avatar brappier commented on August 12, 2024

Yup, unsigning it, then patching it and signing it again works. Thanks.
Whats surprising is that you dont have to do that if the payload is smaller in size.

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.