From 653e0eafc9b51e4a31ac73cfd33d3260c83b38a1 Mon Sep 17 00:00:00 2001
From: jdh8d <jdh8d@localhost>
Date: Thu, 22 Mar 2018 14:06:54 +0000
Subject: [PATCH] ida-pro remote server updates

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

diff --git a/SMP-analyze-remote.sh b/SMP-analyze-remote.sh
index 4eaa58e..95a2553 100755
--- a/SMP-analyze-remote.sh
+++ b/SMP-analyze-remote.sh
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+set -x
+
 if [ -z "$IDA_PRO_SERVER_HOST" ]; then echo Failed to set IDA_PRO_SERVER_HOST; exit 2; fi
 if [ -z "$IDA_PRO_SERVER_USER" ]; then
     IDA_PRO_SERVER_USER=`whoami`
@@ -51,11 +53,7 @@ waitStopTime=`date +%s`
 # Run ida pro on server
 # \time tells the shell to use /usr/bin/time instead of the buil-in time command
 # /usr/bin/time reports the time on stderr. The commands below set executeTime to the time reported by /usr/bin/time
-if [ -z "$SMPSA_PLUGIN" ]; then
-	ssh -p $IDA_PRO_SERVER_PORT $IDA_PRO_SERVER_USER@$IDA_PRO_SERVER_HOST "cd 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
-else
-	ssh -p $IDA_PRO_SERVER_PORT $IDA_PRO_SERVER_USER@$IDA_PRO_SERVER_HOST "cd peasoup; source set_env_vars; export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.; export SMPSA_PLUGIN=$directory/SMPStaticAnalyzer.plx; cd $directory; screen -D -L -ln -m -a -T xterm sh -x "'$SMPSA_HOME'"/SMP-analyze.sh $@; rm -f $directory/SMPStaticAnalyzer.plx" 2>&1
-fi
+	ssh -p $IDA_PRO_SERVER_PORT $IDA_PRO_SERVER_USER@$IDA_PRO_SERVER_HOST "cd $IDA_PRO_REMOTE_DIR; source set_env_vars; export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.; cd $directory; "'$SMPSA_HOME'"/SMP-analyze.sh $@" 2>&1
 
 copyAnswerStartTime=`date +%s`
 # Copy the answer back
-- 
GitLab