Net_Nmap
[ class tree: Net_Nmap ] [ index: Net_Nmap ] [ all elements ]

Class: Net_Nmap

Source Location: /Net_Nmap-0.9.9/Nmap.php

Class Overview


Simple wrapper interface for the Nmap utility.


Author(s):

Copyright:

  • 2008 Luca Corbo

Methods


Inherited Variables

Inherited Methods


Class Details

[line 45]
Simple wrapper interface for the Nmap utility.


[ Top ]


Method Detail

__construct (Constructor)   [line 111]

Net_Nmap __construct( [array $options = array()])

Creates a new Nmap object

Available options are:

  • string nmap_binary: The location of the Nmap binary. If not specified, defaults to '/usr/bin/nmap'.
  • string output_file: Path to store the Nmap XML output file. If not specified, a temporary file is created.
  • boolean os_detection: Force the OS detection, requires root privileges. If not specified, defaults to false.

  • Access: public

Parameters:

array   $options   —  optional. An array of options used to create the Nmap object. All options must be optional and are represented as key-value pairs.

[ Top ]

getFailedToResolveHosts   [line 228]

Array getFailedToResolveHosts( )

Get all the hostnames/IPs failed to resolve during scanning operation
  • Return: Returns array
  • Access: public

[ Top ]

parseXMLOutput   [line 201]

ArrayIterator parseXMLOutput( [string $output_file = null])

Get all the discovered hosts
  • Return: Returns Hosts Object on success.
  • Throws: Net_Nmap_Exception If a parsing error occurred.
  • Access: public

Parameters:

string   $output_file   —  Absolute path of the file to parse (optional)

[ Top ]

scan   [line 173]

true scan( array $targets)

Scan the specified target
  • Return: | PEAR_Error
  • Throws: Net_Nmap_Exception If Nmap binary does not exist or the command failed to execute.
  • Access: public

Parameters:

array   $targets   —  Array contains hostnames, IP addresses, networks to scan

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:19:45 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.