Monthly Archives: June 2009

Perl – SysGuard

I had a problem with web crackers changing some of my pages, adding some nasty JavaScript at the bottom. This script I wrote checks a database defined list of directories and files for various types of change. It can detect changes like file size, inode change, owner, group owner, permissions, etc. If the scan is running on a directory, it detects for any missing / added files. It is to be run from the bash shell, or from CRON.

Running it with result in this help screen:

SysGuard - Bray Almini 2009-06-28.
Keeps an eye on files and folders, detecting new files and changes.

usage: ./ [funtion] [file path]

        --scan  Check all files and folders in DB for changes
        --update        Update data on old record, or create a new record
        --list  Display all files and folders being watched
        --clear Delete a record from the DB

Read more »