Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
rack-bug — 作为中间件实现的Rack应用程序调试工具栏 | Kitploit
工具/GitHubGitHub/brynary/rack-bug
防御工具调试器Web安全
GitHubbrynary/rack-bug

rack-bug

作为中间件实现的Rack应用程序调试工具栏

查看仓库
1.1k102214年前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

Rack::Bug Code Climate

  • 仓库: http://github.com/brynary/rack-bug

描述

Rack::Bug为Rack应用添加一个诊断工具栏。启用后,它会注入一个浮动的div,允许浏览日志、数据库查询、模板渲染时间等。

特性

  • 基于密码的安全
  • 基于IP的安全
  • Rack::Bug的检测/报告被分解为面板。
    • 默认配置中的面板:
      • Rails Info
      • 计时器
      • 请求变量
      • SQL
      • Active Record
      • 缓存
      • 模板
      • 日志
      • 内存
    • 其他捆绑的面板:
      • Redis
      • Sphinx
    • 添加自定义面板的API简单而强大

Rails快速入门

root@kitploit:~
script/plugin install git://github.com/brynary/rack-bug.git

在config/environments/development.rb中,添加:

root@kitploit:~
config.middleware.use "Rack::Bug",
  :secret_key => "someverylongandveryhardtoguesspreferablyrandomstring"

将书签小工具添加到浏览器中:

root@kitploit:~
open http://RAILS_APP/__rack_bug__/bookmarklet.html

与非Rails的Rack应用一起使用

像任何其他中间件一样使用Rack::Bug。有关示例Sinatra应用,请参见spec/fixtures文件夹中的SampleApp。

如果希望使用日志面板,请定义LOGGER常量,该常量为Ruby Logger或ActiveSupport::BufferedLogger。

配置自定义面板

指定你想要的的面板集合,以及它们出现的顺序:

root@kitploit:~
require "rack/bug"

ActionController::Dispatcher.middleware.use Rack::Bug,
  :secret_key => "someverylongandveryhardtoguesspreferablyrandomstring",
  :panel_classes => [
    Rack::Bug::TimerPanel,
    Rack::Bug::RequestVariablesPanel,
    Rack::Bug::RedisPanel,
    Rack::Bug::TemplatesPanel,
    Rack::Bug::LogPanel,
    Rack::Bug::MemoryPanel
  ]

在预发布或生产环境中运行Rack::Bug

我们发现Rack::Bug足够快,可以用于特定的故障排查工作在生产环境中运行。

配置

将中间件配置添加到初始化程序或适当的环境文件中,同时考虑本节其余部分。

安全

限制访问特定IP地址:

root@kitploit:~
require "ipaddr"

ActionController::Dispatcher.middleware.use "Rack::Bug"
  :secret_key => "someverylongandveryhardtoguesspreferablyrandomstring",
  :ip_masks   => [IPAddr.new("2.2.2.2/0")]

使用密码限制访问:

root@kitploit:~
ActionController::Dispatcher.middleware.use "Rack::Bug",
  :secret_key => "someverylongandveryhardtoguesspreferablyrandomstring",
  :password   => "yourpassword"

作者

  • 由Bryan Helmkamp维护
  • 来自Luke Melia、Joey Aghion、Tim Connor等人的贡献

致谢

Rack::Bug的灵感主要来自Django调试工具栏。其他灵感来自Rails footnotes、Rack的ShowException中间件、Oink和Rack::Cache。

感谢Weplay.com支持Rack::Bug的开发。

开发

为了进行开发,你需要安装以下gem:rspec, rack-test, webrat, sinatra。

许可证

参见本目录中的MIT-LICENSE.txt。

下载工具