Jump to content

Experiment Hacking With JavaScript (Node.Js)


DroidXrX

Recommended Posts

I'm experimenting with making Node.js Addon read/write memory for android.

Video: https://sendvid.com/pdm8zl5g

Telegram: https://t.me/DroidXrX

const memoryjs = require("/data/node-v14.15.4/lib/node_modules/memoryjs-android");

const offsets = [0x0, 0x1, 0x2, 0x3];

async function main() {
	const { p_id, pkgName } = memoryjs.getProcessId("com.name.pkg");

	if (p_id < 0) return;

	const lib_base_address = memoryjs.getModuleBase(p_id, "lib_name.so");

	while (memoryjs.gameAppIsRun(p_id, pkgName)) {
		await memoryjs.waitsLoop(10);

		const address = memoryjs.pointerChain(p_id, lib_base_address, offsets, 64);

		const valueDword = memoryjs.readDword(p_id, address, 64);
		const valueQword = memoryjs.readQword(p_id, address, 64);
		const valueFloat = memoryjs.readFloat(p_id, address, 64);

		memoryjs.writeDword(p_id, address, 111, 64);
		memoryjs.writeQword(p_id, address, 111, 64);
		memoryjs.writeFloat(p_id, address, 111.0, 64);
	}
}

main();

 

Link to comment
Share on other sites

Does this work as a CPP file? 

I will need an offset address (float, Dword...) libue4.so

In practice should it work in any game?

Just move to /data/tmp/ and run?

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.