https://github.com/gcmurphy/metasploit_ex
Metasploit RPC support for the Elixir language.
https://github.com/gcmurphy/metasploit_ex
elixir metasploit-framework security-tools
Last synced: about 1 year ago
JSON representation
Metasploit RPC support for the Elixir language.
- Host: GitHub
- URL: https://github.com/gcmurphy/metasploit_ex
- Owner: gcmurphy
- License: mit
- Created: 2019-04-22T23:45:09.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-08T01:07:30.000Z (almost 7 years ago)
- Last Synced: 2025-01-29T23:22:20.746Z (over 1 year ago)
- Topics: elixir, metasploit-framework, security-tools
- Language: Elixir
- Size: 11.7 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Metasploit
[](https://app.fossa.io/projects/git%2Bgithub.com%2Fgcmurphy%2Fmetasploit_ex?ref=badge_shield)
A Elixir access the Metasploit framework. Allows a Metsploit session to
be controlled via Elixir over the msgprc protocol.
## Usage
With the Metasploit RPC daemon started:
`msfrpcd -U msf -P correct_horse_battery_staple -a 127.0.0.1 -p 55553`
The RPC framework can be used directly to issue RPC calls:
```elixir
alias Metasploit.RPC
client = RPC.client("msf", "correct_horse_battery_staple", endpoint: "https://127.0.0.1:55553")
client |> RPC.call("core.version")
```
Or alternatively you can run a series of commands as you would via the
console:
```elixir
alias Metasploit.Console
# create a console session
{:ok, pid} = Console.start_link({"msf", "correct_horse_battery_staple", endpoint: "https://127.0.0.1:55553"})
# Issue write / read commands individually
Console.write(pid, "use auxiliary/scanner/http/ssl")
Console.write(pid, "set RHOSTS 192.168.1.0/24")
Console.write(pid, "run")
Console.read(pid)
# Or run a batch series of commands
Console.run(pid, ~s(
use auxiliary/scanner/http/ssl
set RHOSTS 192.168.1.0/24
run
))
```
It should be noted that:
- A console session becomes inactive 5 minutes after last command was sent.
- Read will block until it receives some data or times out.
## Status
This module is currently under development and has not been published to hex.pm
yet.
## License
[](https://app.fossa.io/projects/git%2Bgithub.com%2Fgcmurphy%2Fmetasploit_ex?ref=badge_large)