※Tripwire設定ファイル(テキスト版)を復元する場合 # twadmin -m f -c /etc/tripwire/tw.cfg > /etc/tripwire/twcfg.txt
# gedit /etc/tripwire/twpolmake.pl
#!/usr/bin/perl # Tripwire Policy File customize tool # ---------------------------------------------------------------- # Copyright (C) 2003 Hiroaki Izumi # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ---------------------------------------------------------------- # Usage: # perl twpolmake.pl {Pol file} # ---------------------------------------------------------------- # $POLFILE=$ARGV[0]; open(POL,"$POLFILE") or die "open error: $POLFILE" ; my($myhost,$thost) ; my($sharp,$tpath,$cond) ; my($INRULE) = 0 ; while (<POL>) { chomp; if (($thost) = /^HOSTNAME\s*=\s*(.*)\s*;/) { $myhost = `hostname` ; chomp($myhost) ; if ($thost ne $myhost) { $_="HOSTNAME=\"$myhost\";" ; } } elsif ( /^{/ ) { $INRULE=1 ; } elsif ( /^}/ ) { $INRULE=0 ; } elsif ($INRULE == 1 and ($sharp,$tpath,$cond) = /^(\s*\#?\s*)(\/\S+)\b(\s+->\s+.+)$/) { $ret = ($sharp =~ s/\#//g) ; if ($tpath eq '/sbin/e2fsadm' ) { $cond =~ s/;\s+(tune2fs.*)$/; \#$1/ ; } if (! -s $tpath) { $_ = "$sharp#$tpath$cond" if ($ret == 0) ; } else { $_ = "$sharp$tpath$cond" ; } } print "$_\n" ; } close(POL) ;
Received: from mx02-u01-tyo.paasmail.conoha.io (unknown [10.1.11.5])
by mda02-u01-tyo.paasmail.conoha.io (Postfix) with ESMTP id 2D4564CF824;
Sat, 17 Nov 2018 00:33:48 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by mx02-u01-tyo.paasmail.conoha.io (Postfix) with ESMTP id 24B71E45BA;
Sat, 17 Nov 2018 00:33:48 +0000 (UTC)
X-Virus-Scanned: amavisd-new at cnode.io
X-Spam-Flag: YES
X-Spam-Score: 31.854
X-Spam-Level: *******************************
X-Spam-Status: Yes, score=31.854 tagged_above=6.9 required=6.9
tests=[BAYES_00=-1.9, BITCOIN_SPAM_07=1.499, BITCOIN_SPAM_08=1.499,
CK_HELO_DYNAMIC_SPLIT_IP=0.001, CMAE_1=10, FROM_IN_TO_AND_SUBJ=0.309,
HDR_ORDER_FTSDMCXX_DIRECT=1.56, HDR_ORDER_FTSDMCXX_NORDNS=2.874,
HELO_DYNAMIC_IPADDR2=3.607, HTML_MESSAGE=0.001, MIMEOLE_DIRECT_TO_MX=0.001,
MPART_ALT_DIFF_COUNT=1.112, NO_FM_NAME_IP_HOSTN=1.141,
RCVD_IN_BL_SPAMCOP_NET=1.347, RCVD_IN_PSBL=2.7, RCVD_IN_RP_RNBL=1.31,
RCVD_IN_SORBS_WEB=1.5, RDNS_NONE=0.793, TO_EQ_FM_DIRECT_MX=2.499,
TVD_RCVD_IP=0.001] autolearn=no autolearn_force=no
Received: from mx02-u01-tyo.paasmail.conoha.io ([127.0.0.1])
by localhost (cnode.io [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
id WzMONWcQ5LBO; Sat, 17 Nov 2018 00:33:46 +0000 (UTC)
Received-SPF: softfail (inpac.jp: Sender is not authorized by default to use
‘info@inpac.jp’ in ‘mfrom’ identity, however domain is not currently prepared
for false failures (mechanism ‘~all’ matched))
receiver=eaas-u01-recv-mta02.p1.tyo1.v4.internal-gmo; identity=mailfrom;
envelope-from=”info@inpac.jp”; helo=177-8-50-54.webbytelecom.com.br;
client-ip=177.8.50.54 Received: from 177-8-50-54.webbytelecom.com.br (unknown [177.8.50.54])
by mx02-u01-tyo.paasmail.conoha.io (Postfix) with ESMTP id B8BA8DF2FB
for <info@inpac.jp>; Sat, 17 Nov 2018 00:33:41 +0000 (UTC)
Message-ID: <A5AD300FB83892878F122D9A1AB0A5AD@G33WFJ34>
From: info@inpac.jp
To: info@inpac.jp