Perl Audit Reports

Discussion in 'Perl Misc' started by Kingmaker, Jul 1, 2008.

  1. Kingmaker

    Kingmaker Guest

    I am new to perl . I need to write a perl script to generate an audit
    report of a root directory and all subsequent sub-directories and
    files under it, the report should be able to
    1. list any directories/files changes in size and content, addition,
    deletion of any of them.
    2. It could be run for different location passing parameters.

    the live example is:
    we have all our pkgs installed on unix machine in some location ..
    Here for eg., in /tmp if someone attempts to Insert/Update/Delete any
    file(s) in any of the pkg/directory from this location we should get
    an alert audit report.


    Please help.
     
    Kingmaker, Jul 1, 2008
    #1
    1. Advertising

  2. On Tue, 01 Jul 2008 02:53:37 -0700, Kingmaker wrote:

    > I am new to perl . I need to write a perl script to generate an audit
    > report of a root directory and all subsequent sub-directories and files
    > under it, the report should be able to 1. list any directories/files
    > changes in size and content, addition, deletion of any of them.
    > 2. It could be run for different location passing parameters.
    >
    > the live example is:
    > we have all our pkgs installed on unix machine in some location .. Here
    > for eg., in /tmp if someone attempts to Insert/Update/Delete any file(s)
    > in any of the pkg/directory from this location we should get an alert
    > audit report.


    I use tripwire for this, there probably are others, but if you must do it
    in Perl, simpel matter of programming.

    Think how you want store the state. CSV seems to me a good format, but
    you can also use a database like GDBM for instance. A DB is probably
    easier.

    Use File::Find to iterate over the directory structure and on first run
    store the information, on subsequent runs report differences and possibly
    store the new situation.

    Use Getopt::Long to parse the command line.

    Audi reports should probably be just printed to stdout, run your script
    drom cron and let cron take care of mailing the result. But mailing from
    Perl is also trivial, several modules can do this for you.

    Start writing and when you get stuck, read the posting guidelines (yes
    really, do that first!) and then ask for specific help with what you're
    stuck with at that moment.

    HTH,
    M4
     
    Martijn Lievaart, Jul 1, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kona
    Replies:
    0
    Views:
    540
  2. ritesh malhotra

    audit software

    ritesh malhotra, Oct 24, 2003, in forum: ASP .Net
    Replies:
    7
    Views:
    420
    Road Warrior
    Nov 1, 2003
  3. clintonG

    Audit Controls To Document Properties?

    clintonG, Jun 6, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    370
    clintonG
    Jun 6, 2005
  4. Parag

    Audit trail for web application

    Parag, Jun 21, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    11,614
    Parag
    Jun 22, 2005
  5. Kingmaker

    Perl Audit Reports

    Kingmaker, Jul 1, 2008, in forum: Perl Misc
    Replies:
    0
    Views:
    96
    Kingmaker
    Jul 1, 2008
Loading...

Share This Page