Skip to content

harmon25/msfrpc-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

msfrpc-client

NodeJS client for msfrpcd using bluebird promises

npm install msfrpc-client-node --save

Usage

var MsfRpcClient = require('msfrpc-client-node');

// persist can be used to timeout token on the client, giving the illusion of a persisten token
// set persist to true to set timeout one exec, after 4.5 minutes a token will timeout
var client = new MsfRpcClient({
                                password:'agoodPass',
                                user:'msfUser',
                                host:'localhost',
                                persist:false
                              });

client.exec(['core.version'])
.then(
  (res)=>{
    console.log(`MSF Version : ${res.version} `)
    console.log(`API Verson: ${res.api}`)
  }
)
.catch(console.log);

client.exec(['module.exploits'])
.then(
  (res)=>{
    for(var i=0; i < res.length; i++){
      console.log(res[i])
    }
  }
)
.catch(console.log);

About

NodeJS client for msfrpcd using Promises

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published