lib/nexpose/scan.rb
def scan_ips(site_id, ip_addresses)
      xml = make_xml('SiteDevicesScanRequest', { 'site-id' => site_id })
      hosts = REXML::Element.new('Hosts')
      ip_addresses.each do |ip|
        xml.add_element('range', { 'from' => ip })
      end
      xml.add_element(hosts)

      _scan_ad_hoc(xml)
    end
# Perform an ad hoc scan of a subset of IP addresses for a site.
# Only IPs from a single site can be submitted per request,
# and IP addresses must already be included in the site configuration.
# Method is designed for scanning when the targets are coming from an
# external source that does not have access to internal identfiers.
#
# For example:
#   to_scan = ['192.168.2.1', '192.168.2.107']
#   nsc.scan_ips(5, to_scan)
#
# @param [Fixnum] site_id Site ID that the assets belong to.
# @param [Array[String]] ip_addresses Array of IP addresses to scan.
# @return [Scan] Scan launch information.
#
Perform an ad hoc scan of a subset of IP addresses for a site.
Only IPs from a single site can be submitted per request,
and IP addresses must already be included in the site configuration.
Method is designed for scanning when the targets are coming from an
external source that does not have access to internal identfiers.


Perform an ad hoc scan of a subset of IP addresses for a site . Only IPs from a single site can be submitted per request and IP addresses must already be included in the site configuration . Method is designed for scanning when the targets are coming from an external source that does not have access to internal identfiers .
def scan_ips(site_id, ip_addresses)
      xml = make_xml('SiteDevicesScanRequest', { 'site-id' => site_id })
      hosts = REXML::Element.new('Hosts')
      ip_addresses.each do |ip|
        xml.add_element('range', { 'from' => ip })
      end
      xml.add_element(hosts)
      _scan_ad_hoc(xml)
    end
def scan_ips ( site_id , ip_addresses ) xml = make_xml ( 'SiteDevicesScanRequest' , { 'site-id' => site_id } ) hosts = REXML :: Element . new ( 'Hosts' ) ip_addresses . each do | ip | xml . add_element ( 'range' , { 'from' => ip } ) end xml . add_element ( hosts ) _scan_ad_hoc ( xml ) end
Perform an ad hoc scan of a subset of IP addresses for a site.
Perform an ad hoc scan of a subset of IP addresses for a site .
Scan launch information.
Scan launch information .
Scan
site_id
ip_addresses
site_id Site ID that the assets belong to.
site_id Site ID that the assets belong to .
]
ip_addresses Array of IP addresses to scan.
ip_addresses Array of IP addresses to scan .