willdurand / nmap

nmap is a PHP wrapper for Nmap.
MIT License
156 stars 54 forks source link

Uncaught Error: Class 'Nmap' not found #35

Open Gifford47 opened 4 years ago

Gifford47 commented 4 years ago

Hey! Hey! Hey! i just wanted to try nmap, but php doesn't find the class "Nmap". i installed nmap via "composer require willdurand/nmap" successfully. I created the following script: test.php: `<?php

require DIR . '/vendor/autoload.php';

$nmap = new Nmap(); //$nmap->scan([ 'williamdurand.fr' ], [ 21, 22, 80 ]); //$hosts = Nmap::create()->scan([ 'williamdurand.fr' ]); //$ports = $hosts->getOpenPorts(); //echo $ports;

?> `

and my error output: PHP Fatal error: Uncaught Error: Class 'Nmap' not found in /var/www/start/nmap/test.php

Where's my mistake?

mr2017x commented 4 years ago

Got the same error, actually i thought i would stuck with compose but it seems as the build is error?