Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (33 sloc) 957 Bytes
module Intrigue
module Task
class CreateService < BaseTask
def self.metadata
{
:name => "create_service",
:pretty_name => "Create Service",
:authors => ["jcran"],
:description => "This just creates a network service, like a scanner would.",
:references => [],
:type => "discovery",
:passive => true,
:allowed_types => ["IpAddress"],
:example_entities => [
{"type" => "IpAddress", "details" => {"name" => "1.1.1.1"}}
],
:allowed_options => [
{:name => "port", :regex=> "integer", :default => 80 },
{:name => "protocol", :regex=> "alpha_numeric", :default => "tcp" }
],
:created_types => ["IpAddress"]
}
end
## Default method, subclasses must override this
def run
super
opt_port = _get_option "port"
opt_protocol = _get_option "protocol"
_create_network_service_entity(@entity,opt_port,opt_protocol,{})
end
end
end
end