Created
December 11, 2014 00:26
-
-
Save kenichi/bc1061294a621c1f7199 to your computer and use it in GitHub Desktop.
This file contains 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/base' | |
require 'celluloid' | |
class Nmapper | |
include Celluloid | |
def nmap opts = '' | |
`nmap #{opts}` | |
end | |
end | |
class Nmap < Sinatra::Base | |
@@nmapper = Nmapper.pool | |
puts "nmapper size: #{@@nmapper.size}" | |
get '/nmap' do | |
content_type :text | |
@@nmapper.nmap(params[:opts]) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment