https://github.com/harmon25/msfrpc-client
NodeJS client for msfrpcd using Promises
https://github.com/harmon25/msfrpc-client
Last synced: 3 months ago
JSON representation
NodeJS client for msfrpcd using Promises
- Host: GitHub
- URL: https://github.com/harmon25/msfrpc-client
- Owner: harmon25
- License: mit
- Created: 2015-10-03T22:18:22.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-07T01:55:34.000Z (over 10 years ago)
- Last Synced: 2025-09-30T18:57:38.867Z (9 months ago)
- Language: JavaScript
- Size: 26.4 KB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# msfrpc-client
NodeJS client for msfrpcd using bluebird promises
```
npm install msfrpc-client-node --save
```
## Usage
```javascript
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);
```