Git Product home page Git Product logo

file-verification's Introduction

File-Verification

Initial Publish

This is a first crack at a file verification scheme using native powershell. It's a rudamentary attempt at scanning for file integrity using built-in tools within the OS. The idea is to check for file degradation / bit-rot. An initial hash will be created and stored, which will be used to check the exisiting data files on a schedule basis.

The script will scan a set of folders and do the following:

  1. If a hash signature file is found, script will check that it is readable. If readable, proceeds to run a calculation on the current data file and compares to the stored hash. Logs errors if found.

  2. If a hash doesn't exist, create a hash and check that it is valid.

There are some shortcomings. Mainly this is aimed at larger files, as seen by the filters applied. Additionally, ever single file intended to be scanned will have its own paired hash signature file. For larger directories with smaller files (music files, pictures, etc.), this is not going to be feasible.

Requuirements:

Powershell 5.x or recommended. I wrote this on a system with PowerShell v5.1 (Native version in Windows 2016). Running on an older version of PowerShell may work. You results may vary, use at your own peril.

Usage:

Edit the file and change the following parameters to suit your environment:

$logpath

$scanpath

You may also change the filtering options if desired.

Future plans:

-Create hash signature dictionary file for all files contained within a subfolder. This solves the small file issue.

-Modify Script to accept command line parameters. This is mainly for ease of use and portability.

file-verification's People

Contributors

motonuke 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.