Metasploit RPC client for nodejs

npm install msfnode
2 downloads in the last week
12 downloads in the last month


msfnode is a metasploit RPC client for nodejs

It make RPC calls using http/https webservices of msfrpcd daemon.

Metasploit API is really well done, it's not necessary to develop a wrapper for each API functions. Just RTMF : Metasploit Remote API Documentation

Usage sample

Note: do not forget to launch msfrpcd with this syntax if you want to run tests :

./msfrpcd -U myLogin -P myPassword -f
var metasploitClient = require('metasploitJSClient');

var onConnect = function(err,token) {
    if (err) {

var metasploitVersion = function() {

    // Next line is the interesting part.
    // Do not care about token, it will automaticaly
    // be added as the second arguments
    // The first item of the array if the RPC call
    // you want to fire, as described in the
    // metasploit remote api documentation

    var args = ['core.version'];

    client.exec(args,function(err,r) {

        if (err) return console.log('Error: '+err);

        console.log('-> Version: '+r.version);
        console.log('-> Api: '+r.api);
        console.log('-> Ruby: '+r.ruby);

var client = new metasploitClient({
    host:'localhost',   // optional
    port:55553,         // optional
    protocol:'https',   // optional
    apiVersion:'1.0',   // optional
    apiPath:'/api/'     // optional


Have good hacks !

The tests directory contains more examples.

Just by curiosity, if you are using this module, please star it !

Thank you

Special thanks to authors of theses nodejs modules :

npm loves you