update
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
action="${1:-}"
|
action="${1:-}"
|
||||||
FOLDER='/opt/idssys/ta-proxmenu'
|
FOLDER='/opt/idssys/ta-proxmenu'
|
||||||
VERS='2026.7.28-4'
|
VERS='2026.7.28-5'
|
||||||
|
|
||||||
noupdate=' '
|
noupdate=' '
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
TAPM_READ_MASKED() {
|
||||||
|
local destination="$1"
|
||||||
|
local character=''
|
||||||
|
local value=''
|
||||||
|
|
||||||
|
while IFS= read -r -s -n 1 character; do
|
||||||
|
if [[ -z "$character" ]]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
case "$character" in
|
||||||
|
$'\177' | $'\b')
|
||||||
|
if [[ -n "$value" ]]; then
|
||||||
|
value="${value%?}"
|
||||||
|
printf '\b \b'
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
value+="$character"
|
||||||
|
printf '*'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
printf '\n'
|
||||||
|
printf -v "$destination" '%s' "$value"
|
||||||
|
}
|
||||||
+6
-8
@@ -8,6 +8,7 @@ source /opt/idssys/ta-proxmenu/inc/git-update.inc
|
|||||||
source /opt/idssys/ta-proxmenu/inc/ha-status.inc
|
source /opt/idssys/ta-proxmenu/inc/ha-status.inc
|
||||||
source /opt/idssys/ta-proxmenu/inc/post-install.inc
|
source /opt/idssys/ta-proxmenu/inc/post-install.inc
|
||||||
source /opt/idssys/ta-proxmenu/inc/rmm.inc
|
source /opt/idssys/ta-proxmenu/inc/rmm.inc
|
||||||
|
source /opt/idssys/ta-proxmenu/inc/secure-input.inc
|
||||||
source /opt/idssys/ta-proxmenu/inc/deploy-iso-nfs-lxc.sh
|
source /opt/idssys/ta-proxmenu/inc/deploy-iso-nfs-lxc.sh
|
||||||
source /opt/idssys/ta-proxmenu/inc/deploy-pulse-lxc.sh
|
source /opt/idssys/ta-proxmenu/inc/deploy-pulse-lxc.sh
|
||||||
source /opt/idssys/ta-proxmenu/inc/virtio-helpers.inc
|
source /opt/idssys/ta-proxmenu/inc/virtio-helpers.inc
|
||||||
@@ -172,8 +173,7 @@ TAPM_AUTHORIZE() {
|
|||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
echo -en "${idsCL[LightYellow]}Paste the TAPM deployment code: ${idsCL[Default]}"
|
echo -en "${idsCL[LightYellow]}Paste the TAPM deployment code: ${idsCL[Default]}"
|
||||||
read -r -s deploycode
|
TAPM_READ_MASKED deploycode
|
||||||
echo
|
|
||||||
deploycode="${deploycode^^}"
|
deploycode="${deploycode^^}"
|
||||||
if [[ ! "$deploycode" =~ ^TAPM-[0-9A-HJKMNP-TV-Z]{5}-[0-9A-HJKMNP-TV-Z]{5}$ ]]; then
|
if [[ ! "$deploycode" =~ ^TAPM-[0-9A-HJKMNP-TV-Z]{5}-[0-9A-HJKMNP-TV-Z]{5}$ ]]; then
|
||||||
unset deploycode
|
unset deploycode
|
||||||
@@ -311,8 +311,7 @@ INSTALL_SCREENCONNECT() {
|
|||||||
fi
|
fi
|
||||||
TAPM_CLEAR_AUTHORIZATION
|
TAPM_CLEAR_AUTHORIZATION
|
||||||
echo -en "\n${idsCL[LightYellow]}Paste the URL provided from the Build Installer: ${idsCL[Default]}"
|
echo -en "\n${idsCL[LightYellow]}Paste the URL provided from the Build Installer: ${idsCL[Default]}"
|
||||||
read -r -s SCURL
|
TAPM_READ_MASKED SCURL
|
||||||
echo
|
|
||||||
[[ -n "$SCURL" ]] || { echo "No URL supplied."; FINISH_FAILED_ACTION; return; }
|
[[ -n "$SCURL" ]] || { echo "No URL supplied."; FINISH_FAILED_ACTION; return; }
|
||||||
if ! TAPM_CREATE_TEMP_DIR screenconnect; then
|
if ! TAPM_CREATE_TEMP_DIR screenconnect; then
|
||||||
unset SCURL
|
unset SCURL
|
||||||
@@ -368,8 +367,7 @@ INSTALL_RMM() {
|
|||||||
TAPM_CLEAR_AUTHORIZATION
|
TAPM_CLEAR_AUTHORIZATION
|
||||||
|
|
||||||
echo -en "\n${idsCL[LightYellow]}Paste the Linux Server URL provided from the Download Agent screen: ${idsCL[Default]}"
|
echo -en "\n${idsCL[LightYellow]}Paste the Linux Server URL provided from the Download Agent screen: ${idsCL[Default]}"
|
||||||
read -r -s RMMURL
|
TAPM_READ_MASKED RMMURL
|
||||||
echo
|
|
||||||
[[ -n "$RMMURL" ]] || { echo "No URL supplied."; FINISH_FAILED_ACTION; return; }
|
[[ -n "$RMMURL" ]] || { echo "No URL supplied."; FINISH_FAILED_ACTION; return; }
|
||||||
if ! TOKEN="$(TAPM_RMM_TOKEN_FROM_URL "$RMMURL")"; then
|
if ! TOKEN="$(TAPM_RMM_TOKEN_FROM_URL "$RMMURL")"; then
|
||||||
echo "Unable to extract the RMM token from the URL."
|
echo "Unable to extract the RMM token from the URL."
|
||||||
@@ -439,6 +437,7 @@ INSTALL_S1() {
|
|||||||
FINISH_FAILED_ACTION
|
FINISH_FAILED_ACTION
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
echo
|
||||||
|
|
||||||
if ! TAPM_CREATE_TEMP_DIR sentinelone; then
|
if ! TAPM_CREATE_TEMP_DIR sentinelone; then
|
||||||
TAPM_CLEAR_AUTHORIZATION
|
TAPM_CLEAR_AUTHORIZATION
|
||||||
@@ -477,8 +476,7 @@ INSTALL_S1() {
|
|||||||
TAPM_CLEAR_AUTHORIZATION
|
TAPM_CLEAR_AUTHORIZATION
|
||||||
|
|
||||||
echo -en "${idsCL[LightYellow]}Paste the customers SentinelOne Site Token: ${idsCL[Default]}"
|
echo -en "${idsCL[LightYellow]}Paste the customers SentinelOne Site Token: ${idsCL[Default]}"
|
||||||
read -r -s s1token
|
TAPM_READ_MASKED s1token
|
||||||
echo
|
|
||||||
[[ -n "$s1token" ]] || {
|
[[ -n "$s1token" ]] || {
|
||||||
TAPM_CLEAN_TEMP_DIR "$temp_dir"
|
TAPM_CLEAN_TEMP_DIR "$temp_dir"
|
||||||
echo "No SentinelOne site token supplied."
|
echo "No SentinelOne site token supplied."
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
TEST_ROOT="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd -P)"
|
||||||
|
# shellcheck source=../inc/secure-input.inc
|
||||||
|
source "${TEST_ROOT}/inc/secure-input.inc"
|
||||||
|
|
||||||
|
masked_value=''
|
||||||
|
output_file="$(mktemp)"
|
||||||
|
trap 'rm -f "$output_file"' EXIT
|
||||||
|
|
||||||
|
TAPM_READ_MASKED masked_value >"$output_file" <<'EOF'
|
||||||
|
TAPM-secret
|
||||||
|
EOF
|
||||||
|
|
||||||
|
if [[ "$masked_value" != 'TAPM-secret' ]]; then
|
||||||
|
printf 'FAIL: masked input did not preserve the entered value\n' >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [[ "$(cat "$output_file")" != '***********' ]]; then
|
||||||
|
printf 'FAIL: masked input did not display one marker per character\n' >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf 'PASS: masked secret input\n'
|
||||||
Reference in New Issue
Block a user