-
Notifications
You must be signed in to change notification settings - Fork 103
Using Discovery Connections
gschneider edited this page Apr 28, 2015
·
1 revision
Nexpose 5.13 supports DHCP asset discovery.
require 'nexpose'
nsc = Nexpose::Connection.new(hostname, nexpose_user, nexpose_password)
nsc.login
# Create a new Discovery Connection object
discovery_connection = Nexpose::DiscoveryConnection.new(
connection_name,
log_directory,
cifs_user,
cifs_password
)
# Use the Local scan engine for this connection
engine = nsc.engines.find { |engine| engine.name.eql?('Local scan engine') }
discovery_connection.engine_id = engine.id
# Set DHCP settings on the Discovery Connection
discovery_connection.protocol = Nexpose::DiscoveryConnection::Protocol::SERVICE_PROXY
discovery_connection.type = Nexpose::DiscoveryConnection::Type::DHCP_SERVICE
# Save a new DHCP Discovery Connection
discovery_connection.save(nsc)
# Delete a DHCP Discovery Connection
discovery_connection.delete(nsc)
Project Home 🔹 Release Notes 🔹 Wiki 🔹 Issues 🔹 Pull Requests