From 8de8b716ff0daaaf4cc9908477cc3d30b27921cb Mon Sep 17 00:00:00 2001 From: shizaterrorblade Date: Sun, 8 Mar 2026 20:20:41 +0300 Subject: [PATCH 1/2] fix: add missing 'column' dependency and update installer for modern debian/ubuntu --- censorcheck.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/censorcheck.sh b/censorcheck.sh index cb2c432..a4d7475 100755 --- a/censorcheck.sh +++ b/censorcheck.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash readonly SCRIPT_NAME=$(basename "$0") -readonly DEPENDENCIES=("curl" "nslookup" "netcat" "jq") +readonly DEPENDENCIES=("curl" "nslookup" "netcat" "jq" "column") readonly COLOR_WHITE="\033[97m" readonly COLOR_RED="\033[31m" @@ -72,6 +72,7 @@ declare -A DEPENDENCY_COMMANDS=( [curl]="curl" [nslookup]="nslookup" [netcat]="nc" + [column]="column" ) error_exit() { @@ -219,13 +220,14 @@ install_with_package_manager() { local use_sudo="" local packages=() shift - + for dep in "$@"; do case "$pkg_manager" in apt | termux) case "$dep" in nslookup) packages+=("dnsutils") ;; netcat) packages+=("netcat-openbsd") ;; + column) packages+=("bsdextrautils") ;; *) packages+=("$dep") ;; esac ;; @@ -233,6 +235,7 @@ install_with_package_manager() { case "$dep" in nslookup) packages+=("bind") ;; netcat) packages+=("openbsd-netcat") ;; + column) packages+=("util-linux") ;; *) packages+=("$dep") ;; esac ;; @@ -240,6 +243,7 @@ install_with_package_manager() { case "$dep" in nslookup) packages+=("bind-utils") ;; netcat) packages+=("netcat") ;; + column) packages+=("util-linux") ;; *) packages+=("$dep") ;; esac ;; From 529cfacf69b6f9928edbec1a2f299b4621445dcc Mon Sep 17 00:00:00 2001 From: shizaterrorblade Date: Sun, 8 Mar 2026 20:28:24 +0300 Subject: [PATCH 2/2] fix: add missing 'column' dependency and update installer for modern debian/ubuntu Problem The script fails on minimal OS installations (e.g., bare Debian/Ubuntu or slim Docker images) with the following error: `column: command not found` This happens because the script relies on `column -t` for result formatting, but doesn't check for this dependency or include it in the automatic installer. Changes - Added `column` to the `DEPENDENCIES` list and `DEPENDENCY_COMMANDS` mapping. - Updated `install_with_package_manager` to support modern package names: - Debian/Ubuntu: Added logic to install `bsdextrautils`. - Arch Linux/Fedora/CentOS: Added `util-linux` to provide the `column` utility. - Ensured the script handles dependency installation before attempting to print the final results table. Testing performed - Verified on a minimal Ubuntu Server 24.04 installation where `column` was missing. - Confirmed that the script correctly prompts for and installs the required package. --- censorcheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/censorcheck.sh b/censorcheck.sh index a4d7475..8a89802 100755 --- a/censorcheck.sh +++ b/censorcheck.sh @@ -220,7 +220,7 @@ install_with_package_manager() { local use_sudo="" local packages=() shift - + for dep in "$@"; do case "$pkg_manager" in apt | termux)