marcocesarato / PHP-Antimalware-Scanner

AMWScan (PHP Antimalware Scanner) is a free tool to scan php files and analyze your project to find any malicious code inside it.
https://marcocesarato.github.io/PHP-Antimalware-Scanner/
GNU General Public License v3.0
644 stars 108 forks source link

-bash: !/bin/bash\nphp: event not found during binary installation #108

Open kintaro1981 opened 3 months ago

kintaro1981 commented 3 months ago

I'm trying to use it as binary but following the instructions I'm getting this error:

[10:49][root@mycomputer PHP-Antimalware-Scanner]# wget https://raw.githubusercontent.com/marcocesarato/PHP-Antimalware-Scanner/master/dist/scanner -O /usr/bin/awscan.phar && \
> printf "#!/bin/bash\nphp /usr/bin/awscan.phar \$@" > /usr/bin/awscan && \
-bash: !/bin/bash\nphp: event not found
> chmod u+x,g+x /usr/bin/awscan.phar && \
> chmod u+x,g+x /usr/bin/awscan && \
> export PATH=$PATH":/usr/bin"
--2024-08-26 10:49:17--  https://raw.githubusercontent.com/marcocesarato/PHP-Antimalware-Scanner/master/dist/scanner
Resolving raw.githubusercontent.com... 2606:50c0:8001::154, 2606:50c0:8003::154, 2606:50c0:8002::154, ...
Connecting to raw.githubusercontent.com|2606:50c0:8001::154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 820141 (801K) [application/octet-stream]
Saving to: ‘/usr/bin/awscan.phar’

/usr/bin/awscan.phar                        100%[==========================================================================================>] 800.92K  --.-KB/s    in 0.003s

2024-08-26 10:49:17 (266 MB/s) - ‘/usr/bin/awscan.phar’ saved [820141/820141]

chmod: cannot access ‘/usr/bin/awscan’: No such file or directory