Method: Nmap::Port#scripts

Defined in:
lib/nmap/port.rb

#scriptsHash{String => String}

The output from the NSE scripts ran against the open port.

Returns:

  • (Hash{String => String})

    The NSE script names and output.

Since:

  • 0.3.0



81
82
83
84
85
86
87
88
89
90
91
# File 'lib/nmap/port.rb', line 81

def scripts
  unless @scripts
    @scripts = {}

    @node.xpath('script').each do |script|
      @scripts[script['id']] = script['output']
    end
  end

  return @scripts
end