You are not logged in.
Pages: 1
OK, Ive began a md5 file tracker, its a basic shell script that runs through "/" by default md5suming every file in its wake and storing them in the db which defaults to /etc/md5.db.
Basic usage:
[root@pc-agr root]# pacsec
Usage: pacsec [-f /path/to/md5.db] [-p /path/to/check/from] [-g|-c]
[root@pc-agr root]#
you can simply run:
pacsec -g
to generate the db, and to use that same db to check the fs do:
pacsec -c
more advanced options are i.e.
pacsec -f /mnt/floppy/md5.db -p /home/ody -g
would generate a md5.db of my home dir and stick it on a floppy for me (aslong as its mounted offcourse)
hrmm thats it for now.. theres more u can do with it that just that, but Ill let you figure it out for now.. please send any suggestions, flames, hugs etc.. my way.
oh u can get the shell script from: http://www.netrux.com/pacsec
peace!
Offline
hrmm just noticed its having an awful time with spaced filenames i.e. "im a tit that likes to put spaces in file names.txt"
neone know a good way round this? if not no worries Ill be recoding everything in C soon neway(woohoo file descripters).
Offline
put quotes around the file and path variables
Offline
Thats wont work.. because:
for file in `find $path -type f`
do
will run though each part of the file name with spaces thinking its a different field to pull back.. is there any way of telling the for loop to just pull lines?
Offline
ah...heh :-)
find $path -type f | while read file
do
.............
done
Offline
I get a "command substitution: line 2: syntax error: unexpected end of file"
"
for file in `find $path -type f | while read file`
do
"
with that
Offline
even though the bash script seems to work.. it dies not long after running.. so Im starting again on home ground with C and an md5 implementation... means getting my head round threads but I think Ive got that sussed.. ne good socket coders about?
Offline
it realy dies the werd stuff is this
pacsec -g
please wait, generating md5.db...
md5sum: /proc/sys/net/ipv4/route/flush: Invalid argument
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GU/ d- s: a- C L U P+ L+++ E--- W+
N 0+ K- W-- !O !M V-- PS+ PE- V++ PGP T 5 Z+ R* TV+ B+
DI-- D- G-- e-- h! r++ z+ z*
------END GEEK CODE BLOCK------
Offline
Pages: 1