-
-
Save BrentonEarl/8a93db8f3184533e1a17 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