Socket
Book a DemoInstallSign in
Socket

frida-read-process-memory

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

frida-read-process-memory

Stream the memory of a running process

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

frida-read-process-memory

Stream the memory of a running process.

Example

var frida = require('frida');
var Read = require('frida-read-process-memory');
var bytes = require('bytes');

var session = // frida process session
var reader = Read(session);

reader.on('total', function(t){
  console.log('reading a total of %s', bytes(t));
});
reader.on('range', function(r){
  console.log('reading %s (%s)', r.baseAddress, bytes(r.size));
});
reader.on('skip', function(r){
  console.log('skip %s', r.baseAddress);
});
reader.on('progress', function(p){
  console.log(
    'read %s%',
    Math.round(p.bytesRead/p.bytesTotal*100*100)/100
  )
});
reader.on('end', function(){
  session.detach();
});

reader.pipe(yourDestination);

Check example.js for a script that connects to a phone via USB and dumps the foremost application's memory to dump.out.

Installation

$ npm install frida-read-process-memory

API

Read(session)

Create a read stream streaming data from given session.

#on('total', fn)

Called once with the total number of bytes to read.

#on('range', fn)

Called when about to read a range.

#on('skip', fn)

Called when skipping a rance because of an access violation.

#on('progress', fn)

Called after successfully reading a range, with .bytesRead and .bytesTotal.

Caveats

There is a race condition where process memory is remapped after the memory ranges are fetched, but before they're read. Memory not available anymore will simply be ignored.

License

MIT

FAQs

Package last updated on 04 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts