scr34m / php-malware-scanner

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

Scan directory if relative - it's relative to scan.php dir #32

Closed marek-knappe closed 5 years ago

marek-knappe commented 5 years ago

Not sure if it's an issue, but i'm happy to fix it for you if you think that would be better idea.

[knappe@hosteu10 www]$ ls | grep .php | wc -l
16
[knappe@hosteu10 www]$  /usr/local/php-malware-scanner/scan -d ./
Content-type: text/html; charset=UTF-8

# OK # {./scan.php}
Start time: 2018-10-23 06:17:26
End time: 2018-10-23 06:17:26
Total execution time: 0
Base directory: ./
Total directories scanned: 20
Total files scanned: 1
Total malware identified: 0

I think the ./ should be relative to the getcwd instead of DIR - what do you think?

scr34m commented 5 years ago

Well definitely this would better, DIR was came from web development background, but on CLI it should be CWD instead.