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

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

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

Usage Example

Пример #1
0
 public function testScanWithTreatHostsAsOnline()
 {
     $outputFile = __DIR__ . '/Fixtures/test_scan_with_verbose.xml';
     $expectedCommand = sprintf("nmap -Pn -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->treatHostsAsOnline()->scan(array('williamdurand.fr'));
 }