X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Fagentlessd%2Fscripts%2Fssh_integrity_check_linux;h=51b5796f307d82d0eb2dfa7202f7b80dac3f4cf2;hb=HEAD;hp=6d1870166595bc78aa29faa943afeebef69bd3e0;hpb=6ef2f786c6c8ead94841b5f93baf9f43421f08c8;p=ossec-hids.git diff --git a/src/agentlessd/scripts/ssh_integrity_check_linux b/src/agentlessd/scripts/ssh_integrity_check_linux index 6d18701..51b5796 100755 --- a/src/agentlessd/scripts/ssh_integrity_check_linux +++ b/src/agentlessd/scripts/ssh_integrity_check_linux @@ -1,23 +1,19 @@ #!/usr/bin/env expect -# @(#) $Id: ./src/agentlessd/scripts/ssh_integrity_check_linux, 2011/09/08 dcid Exp $ - # Agentless monitoring # # Copyright (C) 2009 Trend Micro Inc. # All rights reserved. -# +# # This program is a free software; you can redistribute it # and/or modify it under the terms of the GNU General Public # License (version 2) as published by the FSF - Free Software # Foundation. - -# Main script. +# Main script source "agentless/main.exp" - -# SSHing to the box and passing the directories to check. +# SSH to the box and pass the directories to check if [catch { spawn ssh $hostname } loc_error] { @@ -25,12 +21,11 @@ if [catch { exit 1; } - source $sshsrc source $susrc set timeout 600 -send "echo \"INFO: Starting.\"; for i in `find $args 2>/dev/null`;do tail \$i >/dev/null 2>&1 && md5=`md5sum \$i | cut -d \" \" -f 1` && sha1=`sha1sum \$i | cut -d \" \" -f 1` && echo FWD: `stat --printf \"%s:%a:%u:%g\" \$i`:\$md5:\$sha1 \$i; done; exit\r" +send "unset HISTFILE echo \"INFO: Starting.\"; for i in `find $args 2>/dev/null`;do tail \$i >/dev/null 2>&1 && md5=`md5sum \$i | cut -d \" \" -f 1` && sha1=`sha1sum \$i | cut -d \" \" -f 1` && echo FWD: `stat --printf \"%s:%a:%u:%g\" \$i`:\$md5:\$sha1 \$i; done; exit\r" send "exit\r" expect {