hakkuri01/r2rs

GitHub: hakkuri01/r2rs

r2rs是一款用于CVE-2025-55182漏洞测试的Ruby交互式shell工具。

Stars: 1 | Forks: 0

``` __________ __________________ _________ \______ \\_____ \______ \/ _____/ | _/ / ____/| _/\_____ \ | | \/ \| | \/ \ |____|_ /\_______ \____|_ /_______ / \/ \/ \/ \/ (react2rubyshell) ``` ## 系统要求 - 本地 Ruby 环境 - Ruby 标准库:`json`、`net/http`、`optparse`、`readline`、`securerandom`、`shellwords`、`uri` 无需外部 gem。 ## 安装 克隆仓库,进入项目目录,使用 Ruby 运行脚本: ``` git clone https://github.com/hakkuri01/r2rs.git cd r2rs ruby r2rs.rb -h ``` ## 使用方法 ``` ruby r2rs.rb -t TARGET [options] -t, --target TARGET Target IP, hostname, or URL (required) -p, --port PORT Target HTTP port -nb, --no-banner Drop the startup banner -h, --help Show command usage ``` ## 示例 ``` ruby r2rs.rb -t 127.0.0.1 ruby r2rs.rb -t 127.0.0.1 -p 3000 ruby r2rs.rb -t http://127.0.0.1:3000 ruby r2rs.rb -t "https://example.test/app?debug=1" -p 8443 ruby r2rs.rb -nb -t 127.0.0.1 -p 3000 ``` ## 目标处理 如果 `TARGET` 不包含方案,则假定 `http://`。支持 HTTPS URL。 如果目标 URL 包含像 `?` 这样的 shell 特殊字符,请对其进行引号处理: ``` ruby r2rs.rb -t "https://127.0.0.1/test?x=1" ``` ## 活跃会话行为 在启动活跃会话之前,工具使用探测命令验证目标。如果验证失败,则打印错误并退出。 会话由 HTTP 支持:本地 Ruby 重新使用一个 HTTP 连接,通过现有的请求路径发送命令,并在交互式 Readline 提示符中显示响应。提示符上下文在启动时初始化,并在每次命令后刷新,使用远程用户、主机名和工作目录。 输入 `exit` 或按 `Ctrl-C` 关闭会话。 ## 限制 此模式故意不要求目标端 Ruby、Python、`socat`、`script` 或任何其他 PTY 辅助工具。因此,它不是一个真正的远程 PTY。全屏和 TTY 敏感的程序,如 `vim`、`nano`、`su`、`ssh` 和交互式密码提示,可能仍然有限制。