Rob-- / memoryjs

Read and write process memory in Node.js (Windows API functions exposed via Node bindings)
MIT License
632 stars 86 forks source link

readMemory array of bytes #87

Closed Ikacper closed 2 years ago

Ikacper commented 3 years ago

Hey i'm new to programming, I hope my explanation is ok, also it would be great if you guys create kind of discord channel to know where to seek help.

now im readingMemory like that: const data = readMemory(processObject.handle, address + 0x298AD4, "int")

what if i want to read array of bytes which looks like that 41 73 68 00 00 00 00 00 00 00 00 00 00 07, is it possible?

thanks in advance

ecxnkai commented 3 years ago

Hi! I don't know if you are asking about the output data or you want to find the address for the array of bytes you probably want to check out memoryjs.findPattern

slauko commented 2 years ago

i think he wants to read a buffer/array so he can work with it afterwards ... i tried to use this lib too some while ago but the readBuffer method was leaking memory, i dont know if its been fixed yet but since i tested it it got updated to napi so maybe they handle object/memory freeing/deletion now internally

Rob-- commented 2 years ago

@slauko b6b328a fixes the readBuffer memory leak.

@Ikacper you can use readBuffer to read an arbitrary number of bytes.