Nmap\Nmap::enableOsDetection PHP Метод

enableOsDetection() публичный Метод

public enableOsDetection ( boolean $enable = true ) : Nmap
$enable boolean
Результат Nmap
    public function enableOsDetection($enable = true)
    {
        $this->enableOsDetection = $enable;
        return $this;
    }

Usage Example

Пример #1
0
 public function testScanWithOsDetection()
 {
     $outputFile = __DIR__ . '/Fixtures/test_scan_with_os_detection.xml';
     $expectedCommand = sprintf("nmap -O -oX '%s' 'williamdurand.fr'", $outputFile);
     $executor = $this->getProcessExecutorMock();
     $executor->expects($this->at(1))->method('execute')->with($this->equalTo($expectedCommand))->will($this->returnValue(0));
     $nmap = new Nmap($executor, $outputFile);
     $hosts = $nmap->enableOsDetection()->scan(array('williamdurand.fr'));
 }