scr34m / php-malware-scanner

Scans PHP files for malwares and known threats
GNU General Public License v3.0
556 stars 96 forks source link

Cant run scan.php #46

Closed dubbsdubblin closed 5 years ago

dubbsdubblin commented 5 years ago

Hi - just installed on Mac OSX localhost - but when I try and run command "php scan.php -e" in Terminal I get "Could not open input file: scan.php"

Can you tell me how to run the scanner please // thanks

scr34m commented 5 years ago

Because the scan.php is not in path and not in the directory where you would like to run. Check it with ls command to see the scan.php is there or not.

dubbsdubblin commented 5 years ago

Hi - I installed via the command "composer global require scr34m/php-malware-scanner" so unsure where it has been installed - would you happen to know on OSX where this would be?

After running "ls" - no it was not listed

scr34m commented 5 years ago

With the global option the composer install it under /Users/<account name>/.composer/vendor/bin/scan or /Users/<account name>/.composer/vendor/scr34m/php-malware-scanner

dubbsdubblin commented 5 years ago

ok, so to run it i would add the directory info before the "scan.php" element of the command yeh? Sorry - I am new to running a local server (as you can tell!)

scr34m commented 5 years ago

Yes, or simply call ~/.composer/vendor/bin/scan or add /Users/<account name>/.composer/vendor/bin/directory to your $PATH and then only need to issue scan

dubbsdubblin commented 5 years ago

ok thanks - and to get it to run on a folder in my mac I would go with:

php /Users/MacName/.composer/vendor/scr34m/php-malware-scanner/scan.php -d </Users/MacName/Desktop/FolderName/>

scr34m commented 5 years ago

Yes.

dubbsdubblin commented 5 years ago

Thanks