Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][tlug] Tripwire Script
- Date: Sun, 22 May 2005 00:54:00 +0900
- From: Mark Sargent <powderkeg@example.com>
- Subject: [tlug] Tripwire Script
- User-agent: Mozilla Thunderbird 0.9 (X11/20041127)
Hi All, I installed tripwire on my test box(FC3) here at home. My book, Beginning Fedora 2 has a script that is supposed to check the content of twpol.txt.orig against the system and make relevant changes and create a new twpol.txt file. It also prints the number changes to screen. It does this, but, it is not creating the new file. I'll post the script and comand below. #! /usr/bin/perl -w $Additions = 0; $Removals = 0; while ($line = <STDIN>) { if ( $line =~ /^\s*#\s*(\/\S+)/ ) { if ( -e $1 ) { $line =~ s/^\s*#//; $Additions++; } } elsif ( $line =~ /^\s*(\/\S+)/ ) { if ( ! -e $1 ) { $line = "# " . $line; $Removals++; } } } print STDERR "Number of additions: $Additions\n"; print STDERR "Number of removals: $Removals\n"; and the command to run it /usr/local/bin/cleanpol.pl <twpol.txt.orig \ >twpol.txt Hopefully someone in here can spot an error. Cheers. Mark Sargent.
- Follow-Ups:
- Re: [tlug] Tripwire Script
- From: Edward Wright
Home | Main Index | Thread Index
- Prev by Date: [tlug] 1st Post TLUG Meeting Post
- Next by Date: Re: [tlug] OT-Japanese in PHP
- Previous by thread: Re: [tlug] 1st Post TLUG Meeting Post
- Next by thread: Re: [tlug] Tripwire Script
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links