Is there a good checksum system for OPENBSD?

Carl Banks imbosol at vt.edu
Mon Nov 4 03:41:50 EST 2002


John D. wrote:
> I'm looking for a Program that compares md5 file checksums in a file
> against actual files and reports discrepancies.  A commercial
> program like "Tripwire" does this, but isn't there an Open Source
> program that can do this.
> 
> It would be a good thing to use for files in the /bin directories,
> and other places where one would not expect files to be changed, but
> would easily identify trojans, and other changes to executeable
> files and binaries.
> 
> I suppose it wouldn't be that hard to write this in Python or Perl.
> But how long would it take to checksum thousands of files?  John

I wrote a similar program in Python to keep my local web mirror synced
to the on-line version.  My web site has about 1200 files and 500
kilobytes, and my computer can md5 the whole site, when it's not in
the cache, in about 2 seconds or less.  When the site is cached, I
don't notice the delay as all.

I think the key to my program is that it mmaps the files rather than
reading them.

I think this is the kind of task that makes a good educational
project; it's not too complicated, but useful.  So it might be OK to
reinvent the wheel here if you want.  But, it might not be a good idea
to do this if you're going to use it for security.


-- 
CARL BANKS



More information about the Python-list mailing list