{"id":18851608,"url":"https://github.com/eviltik/msfnode","last_synced_at":"2025-10-16T01:11:58.804Z","repository":{"id":57304059,"uuid":"10318516","full_name":"eviltik/msfnode","owner":"eviltik","description":"Metasploit rpc api wrapper (nodejs)","archived":false,"fork":false,"pushed_at":"2016-03-13T08:17:48.000Z","size":11,"stargazers_count":46,"open_issues_count":2,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-11T05:18:12.809Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eviltik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-27T16:30:54.000Z","updated_at":"2025-01-02T01:12:45.000Z","dependencies_parsed_at":"2022-09-20T20:45:42.593Z","dependency_job_id":null,"html_url":"https://github.com/eviltik/msfnode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eviltik%2Fmsfnode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eviltik%2Fmsfnode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eviltik%2Fmsfnode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eviltik%2Fmsfnode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eviltik","download_url":"https://codeload.github.com/eviltik/msfnode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248860107,"owners_count":21173339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T03:35:24.769Z","updated_at":"2025-10-16T01:11:58.732Z","avatar_url":"https://github.com/eviltik.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"msfnode\n=======\n\n**msfnode is a metasploit RPC client for nodejs**\n\nIt make RPC calls using http/https webservices of msfrpcd daemon.\n\nMetasploit API is really well done, it's not necessary to develop a wrapper for each API functions. Just RTMF :\n[Metasploit Remote API Documentation](https://community.rapid7.com/search.jspa?view=content\u0026resultTypes=document\u0026dateRange=all\u0026q=Remote+API\u0026rankBy=relevance\u0026contentType=document\u0026containerType=\u0026container=\u0026containerName=\u0026userID=\u0026numResults=15 \"Metasploit Remote API Documentation\")\n\n\nHow to install\n=========\nas usual ...\n```\nnpm install msfnode\n```\n\n\nHow to use\n=========\n\nNote: do not forget to launch msfrpcd with this syntax if you want to run tests :\n```\n./msfrpcd -U myLogin -P myPassword -f\n```\n\n```\nvar metasploitClient = require('msfnode');\n\n\nvar onConnect = function(err,token) {\n    if (err) {\n        console.log(err.error_message);\n        process.exit(0);\n    }\n    metasploitVersion();\n}\n\nvar metasploitVersion = function() {\n\n    // Do not care about token, it will automaticaly\n    // be added as the second arguments\n    //\n    // The first value of the array is the function\n    // you want to call. Full list is available\n    // in metasploit remote api documentation\n\n    var args = ['core.version'];\n\n    client.exec(args,function(err,r) {\n\n        if (err) return console.log('Error: '+err);\n\n        console.log('-\u003e Version: '+r.version);\n        console.log('-\u003e Api: '+r.api);\n        console.log('-\u003e Ruby: '+r.ruby);\n    });\n}\n\n\nvar client = new metasploitClient({\n    login:'myLogin',\n    password:'myPassword',\n    host:'localhost',   // optional\n    port:55553,         // optional\n    protocol:'https',   // optional\n    apiVersion:'1.0',   // optional\n    apiPath:'/api/'     // optional\n});\n\nclient.on('connected',onConnect);\n\n```\n\nHave good hacks !\n=======\n\nThe tests directory contains more examples.\n\nJust by curiosity, if you are using this module, **please star it** !\n\n\n\nThank you\n=======\nSpecial thanks to authors of theses nodejs modules :\n* [msgpack5](https://github.com/mcollina/msgpack5 \"msgpack\")\n* [qjobs](https://github.com/franck34/qjobs \"qjobs\")\n\nand [dailyjs](http://dailyjs.com/) ;)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feviltik%2Fmsfnode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feviltik%2Fmsfnode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feviltik%2Fmsfnode/lists"}