Improve debug tools install 15/95415/3
authorguillaume.lambert <guillaume.lambert@orange.com>
Fri, 5 Mar 2021 17:29:20 +0000 (18:29 +0100)
committerGuillaume Lambert <guillaume.lambert@orange.com>
Wed, 17 Mar 2021 10:34:44 +0000 (10:34 +0000)
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
 ##############################################################################
 #
-# debian dependecies: apt-get install libnet-openssh-perl libio-pty-perl
+# debian dependencies: apt-get install libnet-openssh-perl libio-pty-perl
 #
 
 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
-of an external file rather instead of writing specific rules.
+of an external file instead of writing specific rules.
 
 OPTIONS :
 
index c5d0e80379799ba16268d0d4deb37f646b3c31bb..789fe187e183bf3fea16b65e27260e280a17e043 100755 (executable)
@@ -7,7 +7,7 @@
 # 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;