Skip to content

Commit

Permalink
LKM & CN fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rootTHC committed Dec 1, 2024
1 parent 0e197cd commit 07f8f8e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hackshell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ bin() {
a="${arch}"
[ "$arch" == "x86_64" ] && arch_alt="amd64"
[ "$arch" == "aarch64" ] && arch_alt="arm64"
[ -z "$arch_alt" ] && arch_alt="$arch"
hs_mkxhome
bin_dl() {
local dst="${XHOME}/${1:?}"
Expand Down Expand Up @@ -1044,7 +1045,7 @@ _warn_rk() {
[ -n "$tainted" ] && {
echo -e "${CR}Non standard LKM detected${CF} (/proc/sys/kernel/tainted=$n)"
cat "/proc/modules" 2>/dev/null | while read -r m; do
command -v modinfo >/dev/null && cat "/proc/modules" 2>/dev/null | while read -r m; do
m="${m%% *}"
str="$(modinfo "$m")"
{ [[ "$str" != *"Build time autogenerated kernel"* ]] || [[ "$str" != *"intree: Y"* ]]; } && {
Expand Down Expand Up @@ -1215,7 +1216,7 @@ loot_cmd() {
local str
shift 1
str="$("$@" 2>/dev/null)"
str="$("$@" 2>/dev/null)" || return #cmd failed
[ -z "$str" ] && return
echo -e "${CB}${name}${CDY}${CF}"
Expand Down Expand Up @@ -1573,7 +1574,7 @@ cn() {
x509="$(timeout "${HS_TO_OPTS[@]}" 2 openssl s_client -showcerts -connect "${1:?}:${2:-443}" 2>/dev/null </dev/null)"
# Extract CN
str="$(echo "$x509" | openssl x509 -noout -subject 2>/dev/null)"
[[ "$str" == "subject"* ]] && [[ "$str" != *"/CN"* ]] && {
[[ "$str" == "subject"* ]] && [[ "$str" == *"/CN"* ]] && {
str="$(echo "$str" | sed '/^subject/s/^.*CN.*=[ ]*//g')"
echo "$str"
}
Expand Down

0 comments on commit 07f8f8e

Please sign in to comment.