krzychu12350/phpmetasploit
Composer 安装命令:
composer require krzychu12350/phpmetasploit
包简介
This plugin allows to interact with Metasploit framework either through msfrpcd deamon or the msgrpc plugin running in msfconsole.
README 文档
README
The PHP library whose code is automatically generated based on the Metasploit framework documentation.
Table of Contents
- Documentation of standard methods
- Class diagram
- Prerequisites
- Installing and running the library
- Run unit tests
- License
Documentation of standard methods
Class diagram
Library class structure
Prerequisites
- PHP 8.1.2 minimum
- Composer 2.5.5 minimum
Installing and running the library
1. Metasploit RPC server initialization
- 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
To start the RPC server through the msfrpcd daemon, launch the system terminal and then execute the following command:
msfrpcd -P <password>
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
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.
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.
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
All Rights Reserved
Copyright (c) 2022 Krzysztof Karaś
Created by Krzysztof Karaś
krzychu12350/phpmetasploit 适用场景与选型建议
krzychu12350/phpmetasploit 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 156 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 07 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 krzychu12350/phpmetasploit 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 krzychu12350/phpmetasploit 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 156
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-07-05