If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
Run ImunifyAV from command line on a specific path
Run ImunifyAV from command line on a specific path
Can you run ImunifyAV from the command line on a specific path and allow the process to stay in the foreground until it is finished and display a report?
Something like clamscan but with the ImunifyAV database.
To review the scans that were started, you can use:
HTML Code:
imunify-antivirus malware on-demand list
Then, once you have the relevant
HTML Code:
SCAN_ID
, you can check the malware findings for that particular scan with:
HTML Code:
imunify-antivirus malware malicious list --by-scan-id <SCAN_ID>
At the moment, the CLI is documented as separate subcommands for starting the scan, checking scan status/list, and then viewing malware results, rather than as a single clamscan-style foreground command that waits for completion and immediately prints the final report. The relevant commands documented are
gave the scan id of that scan, if a true foreground scanning system is not possible.
That way you can script it to run the command and then tell the script to watch for the completion of that scanid.
You can run that command and then immediately run
HTML Code:
imunify-antivirus malware on-demand list
to see the latest/running scanid, but that's kind of a race condition, if another scan happens to start at the same time or the scan finishes before you can get the list.
Additionally, it'd be nice to be able to pass a file with a list of files to scan rather than just a path to scan.
This way you can utilize find to list files that have been modified within a certain amount of days (or whatever you want to find) and pass that list to imunifyav to be scanned.
Thank you for the detailed suggestions! We really appreciate you taking the time to share them. Your feedback makes sense, especially for workflows where a more direct, foreground-style scan/report flow would be helpful.
This looks like a good candidate for a feature request. If you’d like, please submit it via our Feature Portal, as described here: https://features.imunify360.com/
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, personalize advertising, and to analyze site activity. We may share certain information about our users with our advertising and analytics partners. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment