Coder Social home page Coder Social logo

Comments (10)

Rob-- avatar Rob-- commented on May 27, 2024

What does the memory at that address look like in Cheat Engine? In the hex display is there a null terminator after the name of the location?

from memoryjs.

Rob-- avatar Rob-- commented on May 27, 2024

Can you show me the next line of memory too?

from memoryjs.

innosflew avatar innosflew commented on May 27, 2024

The memory address is 7FF60D7CE4F8 and this is what it looks like in Memory Viewer in Cheat Engine:
image

from memoryjs.

innosflew avatar innosflew commented on May 27, 2024

Here is a bigger pic of it:
image

from memoryjs.

Rob-- avatar Rob-- commented on May 27, 2024

Replace all the code from L440 to L473 with this:

char value[1000000];
ReadProcessMemory(handle, (LPVOID) address, value, 1000000, NULL);
if (args.Length() == 4) argv[1] = String::NewFromUtf8(isolate, str.c_str());
else args.GetReturnValue().Set(String::NewFromUtf8(isolate, str.c_str()));

Recompile, and see if that works?

Essentially what it's doing right now is reading 1 character at a time continuously until it finds a null terminator (but this is probably a terrible method), and the 4 lines of code above just try to read 1 million chars at once, but it should include a null terminator. So try that and see if it helps?

By the way, I haven't tested this but hopefully it's directly copy-pastable and works without any errors?

from memoryjs.

innosflew avatar innosflew commented on May 27, 2024

I'm not very well versed in C++ but I modified the file with your suggestion and tried to compile it and it gave me this error:
image

from memoryjs.

Rob-- avatar Rob-- commented on May 27, 2024

You aren't compiling it correctly, in the module directory run npm run build32 or npm run build64.

from memoryjs.

innosflew avatar innosflew commented on May 27, 2024

Oh sorry, I feel stupid now 😅

But anyways, I replaced the code like this:
image

And I tried to compile, but I got an error:
image

from memoryjs.

Rob-- avatar Rob-- commented on May 27, 2024

Oops it's because the code I gave you was wrong, sorry it's because I just typed it out without testing:

char value[1000000];
ReadProcessMemory(handle, (LPVOID) address, value, 1000000, NULL);
if (args.Length() == 4) argv[1] = String::NewFromUtf8(isolate, value);
else args.GetReturnValue().Set(String::NewFromUtf8(isolate, value));

That should hopefully work!

from memoryjs.

Rob-- avatar Rob-- commented on May 27, 2024

I've since updated the reading/writing of strings, closing the issue for now.

from memoryjs.

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.