From d895cbdd69425433c9085da8e598fd94526a266d Mon Sep 17 00:00:00 2001 From: shim_ Date: Wed, 22 Jun 2016 19:14:47 +0200 Subject: [PATCH 1/3] option to disable ps --- init.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/init.sh b/init.sh index 9f48374..6d7dee4 100755 --- a/init.sh +++ b/init.sh @@ -36,3 +36,8 @@ else fi report_loop fi + +if [ ! -z "$HIDE_PROCESSES" ]; then + rm -f /bin/ps + ln -s /bin/true /bin/ps +fi From 79b6aebd7c2f2af33e94aabd3ae1463ba5624bf7 Mon Sep 17 00:00:00 2001 From: shim_ Date: Wed, 22 Jun 2016 19:20:25 +0200 Subject: [PATCH 2/3] use a script rather than a link --- init.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init.sh b/init.sh index 6d7dee4..00ba3d3 100755 --- a/init.sh +++ b/init.sh @@ -39,5 +39,6 @@ fi if [ ! -z "$HIDE_PROCESSES" ]; then rm -f /bin/ps - ln -s /bin/true /bin/ps + echo -e "#!/bin/sh\n\n/bin/true" > /bin/ps + chmod +x /bin/ps fi From b0e889c9773fc2634698f90da9a985928f921756 Mon Sep 17 00:00:00 2001 From: shim_ Date: Wed, 22 Jun 2016 19:30:17 +0200 Subject: [PATCH 3/3] refractor & option to hide connections --- init.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/init.sh b/init.sh index 00ba3d3..30f0270 100755 --- a/init.sh +++ b/init.sh @@ -37,8 +37,16 @@ else report_loop fi +function disable_command { + rm -f $1 + echo -e "#!/bin/sh\n\n/bin/true" > $1 + chmod +x $1 +} + if [ ! -z "$HIDE_PROCESSES" ]; then - rm -f /bin/ps - echo -e "#!/bin/sh\n\n/bin/true" > /bin/ps - chmod +x /bin/ps + disable_command "/bin/ps" +fi + +if [ ! -z "$HIDE_CONNECTIONS" ]; then + disable_command "/bin/netstat" fi