PHPackages                             krzychu12350/phpmetasploit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. krzychu12350/phpmetasploit

ActiveComposer-plugin[API Development](/categories/api)

krzychu12350/phpmetasploit
==========================

This plugin allows to interact with Metasploit framework either through msfrpcd deamon or the msgrpc plugin running in msfconsole.

1.0.0(3y ago)01561MITPHPPHP &gt;=8.1.2

Since Apr 17Pushed 2y ago1 watchersCompare

[ Source](https://github.com/krzychu12350/phpmetasploit-library)[ Packagist](https://packagist.org/packages/krzychu12350/phpmetasploit)[ RSS](/packages/krzychu12350-phpmetasploit/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (8)Versions (12)Used By (1)

Php Metasploit Library
======================

[](#php-metasploit-library)

 *The PHP library whose code is automatically generated based on the Metasploit framework documentation.*

Table of Contents
-----------------

[](#table-of-contents)

- [Documentation of standard methods](#documentation-of-standard-methods)
- [Class diagram](#class-diagram)
- [Prerequisites](#prerequisites)
- [Installing and running the library](#installing-and-running-the-library)
- [Run unit tests](#run-unit-tests)
- [License](#license)

Documentation of standard methods
---------------------------------

[](#documentation-of-standard-methods)

 [![Owner dashboard view](./readme-images/1.svg "This is a Title")](./readme-images/1.svg)

 [Link to documentation](https://docs.rapid7.com/metasploit/standard-api-methods-reference/)

Class diagram
-------------

[](#class-diagram)

 [![Owner dashboard view](./readme-images/2.svg "This is a Title")](./readme-images/2.svg)

 *Library class structure*

Prerequisites
-------------

[](#prerequisites)

1. PHP 8.1.2 minimum
2. Composer 2.5.5 minimum

Installing and running the library
----------------------------------

[](#installing-and-running-the-library)

### 1. Metasploit RPC server initialization

[](#1-metasploit-rpc-server-initialization)

#### - via msgrpc plugin

[](#--via-msgrpc-plugin)

To start the server through the msgrpc plugin, execute the following command in the Metasploit framework default console:

```
  load msgrpc
```

The command has the following parameters:

- ServerHost - hostname on which the server is listening,
- ServerPort - port number on which the server is listening,
- User - user name that allows access to the server,
- Pass – server access password. It is required that the password is enclosed in quotation marks,
- SSL – enable or place SSL on the RPC socket. Select true enable SSL and false disable SSL.

An example command might be as follows:

```
  load msgrpc ServerHost=192.168.1.0 ServerPort=55553 User=user Pass='pass123'
```

#### - via msfrpcd demon

[](#--via-msfrpcd-demon)

To start the RPC server through the msfrpcd daemon, launch the system terminal and then execute the following command:

```
  msfrpcd -P
```

where is the defined password for access to the server, this parameter is required

The above command has the following parameters:

- -a – name of the host on which the server is listening,
- -p – port number on which the server is listening,
- -U – username that allows access to the server,
- -P – access password to the server. The password must be enclosed in single quotes,
- -S – enable or disable SSL on the RPC socket. True enables SSL and false disables SSL,
- -f – adding this parameter starts the msfrpcd daemon in the background.

In each of the parameters, means that the value of the parameter must be provided.

An example command might be as follows:

```
  ./msfrpcd -U user -P pass123 -a 127.0.0.1 -u /api/1.0 -p 55553 -f
```

### 2. Library installation

[](#2-library-installation)

Before installation, make sure that the Composer package manager is installed in the operating system.

Then run the following command to install the library:

```
  composer require krzychu12350/phpmetasploit
```

During the library installation process, allow the library to dynamically generate the code by pressing the y key and then the key confirming the selection of this option.

 [![Owner dashboard view](./readme-images/3.svg "This is a Title")](./readme-images/3.svg)

### 3. Launching the library

[](#3-launching-the-library)

To start using the library, initialize the MsfRpcClient class object, and then call the msfAuth method to obtain the authentication token. As a result, you get a token that allow you to execute all functions available in the library.

 [![Owner dashboard view](./readme-images/4.svg "This is a Title")](./readme-images/4.svg)

 [![Owner dashboard view](./readme-images/5.svg "This is a Title")](./readme-images/5.svg)

Run unit tests
--------------

[](#run-unit-tests)

To run unit tests launch the system terminal and go to root directory of the library and type in following command:

```
  composer tests
```

License
-------

[](#license)

All Rights Reserved

Copyright (c) 2022 Krzysztof Karaś

Created by Krzysztof Karaś

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~135 days

Total

2

Last Release

1194d ago

Major Versions

0.1 → 1.0.02023-03-27

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/61408932?v=4)[Krzysztof Karaś](/maintainers/krzychu12350)[@krzychu12350](https://github.com/krzychu12350)

---

Top Contributors

[![krzychu12350](https://avatars.githubusercontent.com/u/61408932?v=4)](https://github.com/krzychu12350 "krzychu12350 (131 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/krzychu12350-phpmetasploit/health.svg)

```
[![Health](https://phpackages.com/badges/krzychu12350-phpmetasploit/health.svg)](https://phpackages.com/packages/krzychu12350-phpmetasploit)
```

###  Alternatives

[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[ably/ably-php

Ably REST client library for PHP.

597.9M34](/packages/ably-ably-php)[filament/support

Core helper methods and foundation code for all Filament packages.

2331.0M245](/packages/filament-support)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5344.1M564](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2124.7M203](/packages/drupal-core-project-message)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
