From bbe7b9edc57a19627ef2cb969e1dd73d0534424c Mon Sep 17 00:00:00 2001
From: an7s <an7s@localhost>
Date: Tue, 19 Jul 2016 14:29:28 +0000
Subject: [PATCH] Disable strict key checking

---
 SMP-analyze.sh | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/SMP-analyze.sh b/SMP-analyze.sh
index b46717e..cb3c12d 100755
--- a/SMP-analyze.sh
+++ b/SMP-analyze.sh
@@ -41,7 +41,7 @@ verify_host_live()
 
 	echo "Verify host $remotehost is live"
 
-	ssh -o ConnectTimeout=$SIMPLE_TIMEOUT -o BatchMode=yes -p $IDA_PRO_SERVER_PORT $IDA_PRO_SERVER_USER@$remotehost ls /tmp >/dev/null
+	ssh -o StrictHostKeyChecking=no -o ConnectTimeout=$SIMPLE_TIMEOUT -o BatchMode=yes -p $IDA_PRO_SERVER_PORT $IDA_PRO_SERVER_USER@$remotehost ls /tmp >/dev/null
 	if [ ! $? -eq 0 ]; then
 		return 1
 	fi
@@ -67,7 +67,7 @@ server_has_cached_info()
 	echo "Check whether STARS results already present from host $remotehost"
 
 	# Copy the answer back
-	ssh -o ConnectTimeout=$SIMPLE_TIMEOUT -o BatchMode=yes -p $IDA_PRO_SERVER_PORT $IDA_PRO_SERVER_USER@$remotehost ls -l ${DIRECTORY}/a.ncexe.infoannot > tmp.$$
+	ssh -o StrictHostKeyChecking=no -o ConnectTimeout=$SIMPLE_TIMEOUT -o BatchMode=yes -p $IDA_PRO_SERVER_PORT $IDA_PRO_SERVER_USER@$remotehost ls -l ${DIRECTORY}/a.ncexe.infoannot > tmp.$$
 	if [ -f tmp.$$ ]; then
 		grep a.ncexe.infoannot tmp.$$
 		if [ ! $? -eq 0 ]; then
@@ -101,7 +101,7 @@ cleanup_remote_host()
 {
 	remotehost=$1
 	echo "Cleanup host $remotehost"
-	ssh -o ConnectTimeout=$SIMPLE_TIMEOUT -o BatchMode=yes -p $IDA_PRO_SERVER_PORT $remotehost rm -f ${DIRECTORY}/a.i64
+	ssh -o StrictHostKeyChecking=no -o ConnectTimeout=$SIMPLE_TIMEOUT -o BatchMode=yes -p $IDA_PRO_SERVER_PORT $remotehost rm -f ${DIRECTORY}/a.i64
 }
 
 run_remote_command()
@@ -111,15 +111,15 @@ run_remote_command()
 	echo "Remote analyze on host $remotehost"
 
 	# Create remote DIRECTORY
-	ssh -o ConnectTimeout=$SIMPLE_TIMEOUT -o BatchMode=yes -p $IDA_PRO_SERVER_PORT $IDA_PRO_SERVER_USER@$remotehost mkdir -p ${DIRECTORY}
+	ssh -o StrictHostKeyChecking=no -o ConnectTimeout=$SIMPLE_TIMEOUT -o BatchMode=yes -p $IDA_PRO_SERVER_PORT $IDA_PRO_SERVER_USER@$remotehost mkdir -p ${DIRECTORY}
 
 	# Check to see if the Ida Pro Server is too busy now and wait if necc.
 	if [ -n "$MAX_IDA_PROCESSES" ]; then
-		if [ `ssh -o ConnectTimeout=$SIMPLE_TIMEOUT -o BatchMode=yes -p $IDA_PRO_SERVER_PORT $IDA_PRO_SERVER_USER@$remotehost pgrep idal64|wc -l` -ge "$MAX_IDA_PROCESSES" ]; then
+		if [ `ssh -o StrictHostKeyChecking=no -o ConnectTimeout=$SIMPLE_TIMEOUT -o BatchMode=yes -p $IDA_PRO_SERVER_PORT $IDA_PRO_SERVER_USER@$remotehost pgrep idal64|wc -l` -ge "$MAX_IDA_PROCESSES" ]; then
 			echo "Remote server $remotehost too busy (max allowed: $MAX_IDA_PROCESSES) -- skip it"
 			return 1
 		fi
-#	    while [ `ssh -o ConnectTimeout=$SIMPLE_TIMEOUT -o BatchMode=yes -p $IDA_PRO_SERVER_PORT $IDA_PRO_SERVER_USER@$remotehost pgrep idal64|wc -l` -ge "$MAX_IDA_PROCESSES" ]; do
+#	    while [ `ssh -o StrictHostKeyChecking=no -o ConnectTimeout=$SIMPLE_TIMEOUT -o BatchMode=yes -p $IDA_PRO_SERVER_PORT $IDA_PRO_SERVER_USER@$remotehost pgrep idal64|wc -l` -ge "$MAX_IDA_PROCESSES" ]; do
 #	        random=`od -An -N2 -tu2 /dev/urandom`
 #	        # Wait 10-30 seconds
 #		seconds=`expr $random % 20 + 10`
@@ -129,13 +129,13 @@ run_remote_command()
 	fi
 
 	# Copy files to be processed to remote DIRECTORY
-	scp -o ConnectTimeout=$COPY_TIMEOUT -o BatchMode=yes -P $IDA_PRO_SERVER_PORT -q $@ $IDA_PRO_SERVER_USER@$remotehost:$DIRECTORY
+	scp -o StrictHostKeyChecking=no -o ConnectTimeout=$COPY_TIMEOUT -o BatchMode=yes -P $IDA_PRO_SERVER_PORT -q $@ $IDA_PRO_SERVER_USER@$remotehost:$DIRECTORY
 	if [ ! $? -eq 0 ]; then
 		return 1
 	fi
 
 	# Give it max 2 hours for analysis
-	ssh -o ConnectTimeout=$ANALYZE_TIMEOUT -o BatchMode=yes -p $IDA_PRO_SERVER_PORT $IDA_PRO_SERVER_USER@$remotehost "cd ~/techx_umbrella/peasoup; source set_env_vars; export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.; cd $DIRECTORY; screen -D -L -ln -m -a -T xterm sh -x "'$SMPSA_HOME'"/SMP-analyze.sh $@" 2>&1
+	ssh -o StrictHostKeyChecking=no -o ConnectTimeout=$ANALYZE_TIMEOUT -o BatchMode=yes -p $IDA_PRO_SERVER_PORT $IDA_PRO_SERVER_USER@$remotehost "cd ~/techx_umbrella/peasoup; source set_env_vars; export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.; cd $DIRECTORY; screen -D -L -ln -m -a -T xterm sh -x "'$SMPSA_HOME'"/SMP-analyze.sh $@" 2>&1
 	if [ ! $? -eq 0 ]; then
 		return 1
 	fi
-- 
GitLab