Giter VIP home page Giter VIP logo

fim's Introduction

FIM (File Integrity Monitor)

Overview

FIM is a Python script designed for real-time tracking of file changes within specified directories. It provides a robust file integrity monitoring solution to enhance security and ensure the integrity of critical files.

Features

  • Real-time Monitoring: Track changes to files in specified directories.
  • Multiple Paths: Monitor multiple paths concurrently for comprehensive coverage.
  • Configurability: Easily configure monitoring settings using the config.ini file.
  • Ignored Files/Folders: Specify files and folders to be ignored during monitoring.
  • Allowed Extensions: Define file extensions to include or exclude from monitoring.
  • File Size Management: Set a maximum file size for efficient resource utilization.
  • Logging: Log events with different levels (INFO, WARNING, ERROR) to a specified file.
  • Security Measures: Ensure integrity with hash-based integrity checks on the monitor script.

Demonstration

Config file preparation

Calculating hash

Running script and demonstrating it's functionality

Getting Started

Prerequisites

  • Python 3.x
  • hashlib library

Setup

  1. Clone the repository:

    git clone https://github.com/s4crifice/fim.git
  2. Run the hash.py program to calculate the MD5 hash of the main.py script:

    python hash.py
  3. Update the monitor_integrity_hash in config.ini with the calculated MD5 hash.

  4. Customize the config.ini file to meet your monitoring requirements.

Configuration

Monitoring Settings:

  • folder_paths: Comma-separated list of paths to monitor.
  • hash_algorithm: Hashing algorithm to use (e.g., md5, sha256).
  • scan_interval: Time interval (in seconds) between scans.
  • ignore_list: Comma-separated list of files/folders to ignore.
  • max_file_size: Maximum file size to monitor (in bytes).
  • allowed_extensions: Comma-separated list of allowed file extensions.

Logging Settings:

  • log_file: Log file name/path.
  • log_level: Logging level (INFO, WARNING, ERROR).

Security Settings:

  • monitor_integrity_hash: MD5 hash of the main.py script.

Usage

Run the main.py script to initiate the monitoring process:

python main.py

Example Configuration

[Monitoring]
folder_paths = C:\Users\your_username\Documents\Project
hash_algorithm = md5
scan_interval = 1
ignore_list = test.file
max_file_size = 10485760
allowed_extensions = .txt, .log

[Logging]
log_file = monitor.log
log_level = INFO

[Security]
monitor_integrity_hash = 829ee92738a92f8e49186c849df6c965

License

This project is licensed under the MIT License - see the LICENSE file for details.

fim's People

Contributors

s4crifice avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.