Skip to content

Instantly share code, notes, and snippets.

@BrentonEarl
Forked from kenichi/nmapper.rb
Last active August 29, 2015 14:11
Show Gist options
  • Save BrentonEarl/8a93db8f3184533e1a17 to your computer and use it in GitHub Desktop.
Save BrentonEarl/8a93db8f3184533e1a17 to your computer and use it in GitHub Desktop.
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