Improve debug tools install 10/96510/1
authorguillaume.lambert <guillaume.lambert@orange.com>
Fri, 5 Mar 2021 17:29:20 +0000 (18:29 +0100)
committerChristophe Betoule <christophe.betoule@orange.com>
Fri, 11 Jun 2021 13:16:06 +0000 (15:16 +0200)
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: I287fd6e692a70979599b93ff3b59b06706ee62c4

debug_tools/install_perl_dependencies.sh [new file with mode: 0755]
debug_tools/netconf_TCP_SSH_hijackingproxy.pl
debug_tools/netconf_terminal.pl

diff --git a/debug_tools/install_perl_dependencies.sh b/debug_tools/install_perl_dependencies.sh
new file mode 100755 (executable)
index 0000000..d2ef82d
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set +x
+
+#check if apt exists
+if sudo apt-get install libnet-openssh-perl libio-pty-perl;then
+   echo "installed."
+   exit
+fi
+#check if yum exists
+if sudo yum install perl-Net-OpenSSH perl-IO-Tty;then
+    echo "yum-get is installed."
+    sudo yum install perl-Net-OpenSSH perl-IO-Tty
+    exit
+fi
+#check if cpanm exists
+if [ -x "$(command -v cpanm)" ];then
+    echo "cpanm is installed."
+    cpanm IO::Pty
+    cpanm Net::OpenSSH
+    exit
+else
+    echo "cannot install dependencies: apt-get and yum and perlbrew/cpanm are not available." >&2
+    exit 1
+fi
index 05ba2de83bebcf841f4f1acde1edb307d3ddc48c..e1d35fc4de6ccb88a6318fe935390e77012cb59d 100755 (executable)
@@ -7,7 +7,7 @@
 # and is available at http://www.eclipse.org/legal/epl-v10.html
 ##############################################################################
 #
 # and is available at http://www.eclipse.org/legal/epl-v10.html
 ##############################################################################
 #
-# debian dependecies: apt-get install libnet-openssh-perl libio-pty-perl
+# debian dependencies: apt-get install libnet-openssh-perl libio-pty-perl
 #
 
 use strict;
 #
 
 use strict;
@@ -40,7 +40,7 @@ are then proxified between both ends.
 By default, exchanges are altered according to the rules specified inside this script and easily 
 modifiable. This behaviour can be disabled with the '-s' option.
 For more convenience, the server hello handshake can also alternatively be replaced by the content
 By default, exchanges are altered according to the rules specified inside this script and easily 
 modifiable. This behaviour can be disabled with the '-s' option.
 For more convenience, the server hello handshake can also alternatively be replaced by the content
-of an external file rather instead of writing specific rules.
+of an external file instead of writing specific rules.
 
 OPTIONS :
 
 
 OPTIONS :
 
index c5d0e80379799ba16268d0d4deb37f646b3c31bb..789fe187e183bf3fea16b65e27260e280a17e043 100755 (executable)
@@ -7,7 +7,7 @@
 # and is available at http://www.eclipse.org/legal/epl-v10.html
 ##############################################################################
 #
 # and is available at http://www.eclipse.org/legal/epl-v10.html
 ##############################################################################
 #
-# debian dependecies: apt-get install libnet-openssh-perl libio-pty-perl
+# debian dependencies: apt-get install libnet-openssh-perl libio-pty-perl
 #
 
 use strict;
 #
 
 use strict;