ronin-web-server is a custom Ruby web server based on Sinatra tailored for security research and development.
Host
header.Referer
header of the request.User-Agent
header of the
request.User-Agent
header of the request.User-Agent
header of the request.User-Agent
header of the request.User-Agent
header of the request.User-Agent
header of the request.User-Agent
header of the request.Create and run a simple web app:
require 'ronin/web/server'
class App < Ronin::Web::Server::Base
# mount a file
file '/sitemap.xml', './files/sitemap.xml'
# mount a directory
directory '/downloads/', '/tmp/downloads/'
get '/' do
# renders views/index.erb
erb :index
end
get '/test' do
"raw string here"
end
get '/exploit', asn: 13335 do
# route that only matches the AS13335 netblock
end
get '/exploit', asn_name: 'GOOGLE' do
# route that only matches GOOGLE netblocks
end
get '/exploit', country_code: 'US' do
# route that only matches US netblocks
end
get '/exploit', browser: :firefox do
# route that only matches firefox web browsers
end
get '/exploit', browser: :chrome, browser_version: /^99\./ do
# route that only matches chrome 99.X.Y.Z web browsers
end
get '/exploit', os: :ios, os_version: '15.6' do
# route that only matches iOS 15.6 devices
end
# catchall route
get '/exploit' do
"nothing to see here"
end
end
App.run!
Note: See {Ronin::Web::Server::Base} and Sinatra's Intro for additional documentation.
$ gem install ronin-web-server
gem 'ronin-web-server', '~> 0.1'
cd ronin-web-server/
bundle install
git checkout -b my_feature
bundle exec rake spec
git push origin my_feature
ronin-web-server - A custom Ruby web server based on Sinatra.
Copyright (c) 2006-2024 Hal Brodigan (postmodern.mod3 at gmail.com)
ronin-web-server is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ronin-web-server is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with ronin-web-server. If not, see https://www.gnu.org/licenses/.