Wordfence CLI

Wordfence CLI is an open-source, high-performance malware and vulnerability scanner designed for the Linux command line environment. This tool is built to provide site owners, security administrators, operations teams, and security-focused organizations with a powerful and flexible solution for detecting malware and WordPress vulnerabilities at scale.

Wordfense CLI require Python 3.8 or newer installed on your server. To install Wordfence CLI, run the command

pip3 install wordfence

To scan all files in /home directory, run

Advertisement

wordfence malware-scan --output-format csv --output-path /root/wordfence-cli-scan.csv /home/

To get the list of infected files, use

cat wordfence-cli-scan.csv  | grep "/home/" |  awk -F ',' '{print $1}'

In the above command, replace grep “/home/” with the folder where the files are, this will remove non-file lines from the result.

Add a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement