ScanMon is a Node.js-based command-line interface (CLI) tool that leverages ClamAV for virus scanning and database updates. It provides an easy-to-use interface for scanning various directories on your system for potential threats.
- Integrates with ClamAV for robust virus scanning
- Allows updating of ClamAV virus definitions database
- Provides options to scan predefined vulnerable directories or custom paths
- Displays real-time scan progress with a progress bar
- Summarizes scan results, including infected file count and scan duration
Before you begin, ensure you have met the following requirements:
- Node.js (v14.0.0 or later)
- npm (usually comes with Node.js)
- ClamAV installed on your system
-
Clone the repository:
git clone https://github.com/yourusername/scanmon.git cd scanmon -
Install the dependencies:
npm install -
Ensure ClamAV is installed on your system:
- For macOS:
brew install clamav - For Ubuntu/Debian:
sudo apt-get update && sudo apt-get install -y clamav clamav-daemon - For Fedora/CentOS:
sudo dnf install -y clamav clamav-update
- For macOS:
To run ScanMon, use the following command:
node scanmon.js
Follow the on-screen prompts to:
- Choose whether to update the ClamAV database
- Select a predefined set of directories to scan or specify a custom path
- View the scan progress and results
ScanMon uses default paths for ClamAV configuration and databases. If your ClamAV installation uses non-standard paths, you may need to modify the following files:
utils.js: Update theensureDirectoriesfunction with the correct paths for your system.scanner.js: Modify theupdateDatabasefunction if yourfreshclamcommand requires different parameters.
On a Darwin-based system (macOS), some paths are more vulnerable to malware and exploitation than others. Here's a breakdown of paths to prioritize for scanning and those that can be skipped:
/System/Library/ /Library/ /usr/lib/ /usr/local/lib/
/Applications/ ~/Applications/ (user-specific)
/etc/rc.d/ /etc/init.d/ /Library/StartupItems/
~/Downloads/ ~/Documents/ ~/Desktop/
/var/log/
~/Library/Caches/ /var/cache/
~/Library/Application Support/ /var/tmp/
/Network/ /Volumes/ (network-mounted volumes)
/System/Library/CoreServices/ /usr/standalone/
/private/var/folders/ (system cache) /private/var/tmp/ (system temporary files)
~/Library/Application Support/Backup/ /private/var/backup/
- Be cautious when scanning system directories, as false positives can occur.
- Prioritize scanning directories with executable files (e.g., .app, .bundle, .dylib, .so).
- Consider excluding directories with known safe files, like system fonts or language resources.
- Regularly update your antivirus software to ensure the latest malware signatures and detection capabilities.
- Keep in mind that this is not an exhaustive list, and specific use cases may require additional paths to be scanned.
- Always consult your antivirus software's documentation for recommended scanning paths and configurations.
Contributions to ScanMon are welcome. Please follow these steps to contribute:
- Fork the repository
- Create a new branch (
git checkout -b feature/AmazingFeature) - Make your changes
- Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE file for more information.
James - - jchrisa@me.com
Project Link: https://github.com/yourusername/scanmon
