Benign linux Download

sensor_install.sh

AArch64 (ARM64) architecture stringReferences a systemd ExecStart directive
SHA-256fdb3bc13b782f1eb33ea71c7591869471f31c09079cab45dec7d9a217990ab65

Evidence

Shell command-substitution syntax lines 13–32
13:85… rces gpg on)
14# A custom apt URL with gpgcheck disabled is trusted directly (deb [trusted=yes]).
15
16BOLD="$(tput bold 2> /dev/null || printf '')"
17RED="$(tput setaf 1 2> /dev/null || printf '')"
18GREEN="$(tput setaf 2 2> /dev/null || printf '')"
19BLUE="$(tput setaf 4 2> /dev/null || printf '')"
20YELLOW="$(tput setaf 3 2> /dev/null || printf '')"
21NO_COLOR="$(tput sgr0 2> /dev/null || printf '')"
22
23info() {
⋯9 lines
Assigns shell variable from positional parameter lines 44–89
44:30… so a failed re-install doesn't delete a repository
45# that was already configured and working on this host.
46track_added_repo_file() {
47 [ -f "$1" ] || ADDED_REPO_FILE="$1"
48}
49
50on_exit() {
51 status=$?
52 if [ -n "$npipe" ]; then
53 rm -f "$npipe"
54 fi
55 if [ "$status" -ne 0 ] && [ -n "$ADDED_REPO_FILE" ]; then
56 rm -f "$ADDED_REPO_FILE"
57 fi
58 # script exits after this
59}
60
61set_consts() {
62 DOCKER_ONLY_OS_LIST="GCOS Flatcar ClearLinux Photon Gentoo"
63}
64
65is_truthy() {
66 case "$1" in
67 1 | [tT] | [tT][rR][uU][eE] | [yY] | [yY][eE][sS] | [oO][nN]) return 0 ;;
68 *) return 1 ;;
69 esac
70}
⋯7 lines
78
79is_semver() {
80 version=$1
81 SEMVER_REGEX="^[0-9]+\.[0-9]+\.[0-9]+$"
82 if [[ $version =~ $SEMVER_REGEX ]]; then
⋯7 lines
curl command substitution text lines 96–104
96:36… then
97 echo "$WIZ_SENSOR_VERSION"
98 return
99 fi
100
101 version=$(curl_proxy "$SENSOR_VERSION_MAPPING_URL" | grep "^$WIZ_SENSOR_VERSION:" | sed "s/$WIZ_SENSOR_VERSION: //")
102 if [ "$version" = "" ]; then
103 # If this is not a tag, assume it's the real version name to use
104 echo "$WIZ_SENSOR_ …
References the containerd service name lines 111–116
111:32… LL is only supported for container-based installations (Docker, Containerd or Podman)."
112 exit 1
113 fi
114
115 if [ "${WIZ_HOST_NETWORK,,}" == "true" ] && [ "$CONTAINER_INSTALL" != "1" ]; then
116 error "WI …
HTTP URL string literal lines 187–195
187:75… " == "true" ]]; then
188 APT_GPGCHECK=1
189 fi
190
191 PACKAGE_PUBLIC_KEY_URL="https://downloads.${WIZ_DOMAIN}/sensor/sensor_public_key.asc"
192 if [[ -n "$PACKAGE_PUBLIC_KEY_FILE" ]]; then
193 if [ ! -f "$PACKAGE_PUBLIC_KEY_FILE" ]; then
194 error "Public key file not found: $PACKAGE_PUBLIC_KEY_FILE"
195 …

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.