Coder Social home page Coder Social logo

Module Base Addr Size? about memoryjs HOT 9 CLOSED

rob-- avatar rob-- commented on May 27, 2024
Module Base Addr Size?

from memoryjs.

Comments (9)

JaiPe avatar JaiPe commented on May 27, 2024 1

After this PR, everything seems to be behaving correctly on Windows x64 and memory reads are returning the correct addresses/values.

from memoryjs.

JaiPe avatar JaiPe commented on May 27, 2024 1

I have also added a commit to flip around the callback arguments. They seem to be (result, error) for memory reads, but everywhere else is using (error, result) (including the docs and examples).

from memoryjs.

JaiPe avatar JaiPe commented on May 27, 2024 1

And another commit, to add a pointer type for intptr_t address return values, which weren't working with long (since they're long long). Updated docs also.

Feel free to cherry-pick accordingly, if there's any problems with some of these commits.

from memoryjs.

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

Is the target process 32 bit or 64 bit? Use something like process hacker to find the actual base address of the application so you can see if memoryjs or robotjs are actually providing the correct base address.

from memoryjs.

JaiPe avatar JaiPe commented on May 27, 2024

Thanks for the super-quick response! The target is 64 bit. And I built the memoryjs binaries in 64 bit mode.

I'm actually migrating an old robotjs application, which does seem to be returning the correct address. I'm also noticing that most of the modules I'm getting have minus numbers for their base addresses in memoryjs, but not robotjs. So I assume robotjs is returning absolute addresses, whereas memoryjs is returning them relative to something?

e.g.

robotjs:

  Module {
    _valid: true,
    _name: 'mswsock.dll',
    _path: 'C:/WINDOWS/system32/mswsock.dll',
    _base: 140719668068352,
    _size: 417792,
    _proc: Process {},
    _segments: null },

memoryjs:

 { modBaseAddr: -640417792,
    modBaseSize: 417792,
    szExePath: 'C:\\WINDOWS\\system32\\mswsock.dll',
    szModule: 'mswsock.dll',
    th32ModuleID: 5448 },

Thanks!

from memoryjs.

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

Is your Node version 32 bit or 64 bit?

from memoryjs.

JaiPe avatar JaiPe commented on May 27, 2024

Sorry for the delay.
I'm using node 8, 64-bit version.

from memoryjs.

JaiPe avatar JaiPe commented on May 27, 2024

I do get the following errors when compiling the 64 bit version:

..\lib\memoryjs.cc(538): warning C4244: 'initializing': conversion from 'double'                                                                        to 'float', possible loss of data [node_modules\memoryjs                                                                       \build\memoryjs.vcxproj]
..\lib\memoryjs.cc(604): warning C4244: 'argument': conversion from 'uintptr_t'                                                                        to 'double', possible loss of data [node_modules\memoryjs                                                                       \build\memoryjs.vcxproj]
..\lib\memoryjs.cc(609): warning C4244: 'argument': conversion from 'uintptr_t'                                                                        to 'double', possible loss of data

from memoryjs.

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

Thanks for your contribution!

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.