Nmap\Nmap::disablePortScan PHP Method

disablePortScan() public method

public disablePortScan ( boolean $disable = true ) : Nmap
$disable boolean
return Nmap
    public function disablePortScan($disable = true)
    {
        $this->disablePortScan = $disable;
        return $this;
    }

Usage Example

コード例 #1
0
ファイル: NmapTest.php プロジェクト: willdurand/nmap
 public function testPingScan()
 {
     $outputFile = __DIR__ . '/Fixtures/test_ping_scan.xml';
     $expectedCommand = sprintf("nmap -sn -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->disablePortScan()->scan(array('williamdurand.fr'));
 }