403Webshell
Server IP : 104.21.38.3  /  Your IP : 172.69.176.78
Web Server : Apache
System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/shim/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/shim/is-not-revoked
#!/bin/bash
set -e
# we need to set lastpipe so we can read the signers into the signers array below
shopt -s lastpipe

exit=0

quiet=""
if [ "$1" = "-q" ]; then
	quiet=true
	shift
fi

compress_type() {
	local file="$1"
	magic="$(od -x -N2 "$file" | head -1 | cut -d' ' -f2)"
	case $magic in
		8b1f)
			echo "gzip"
			;;
		*)
			echo "none"
			;;
	esac
}

for signed_binary in "$@"; do
	if [ ! -e "$signed_binary" ]; then
		echo "E: $signed_binary: file not found">&2
		exit=1
		continue
	fi

	if [ "$(compress_type "$signed_binary")" = "gzip" ]; then
		_signed_binary="$(mktemp)"
		trap 'rm -f "$_signed_binary"' EXIT
		gunzip < "$signed_binary" > "$_signed_binary"
	else
		_signed_binary="$signed_binary"
	fi
	sbverify --list "$_signed_binary" | grep subject: | grep -E -o "CN=([^/]|\\/)*" | readarray -t signers
	if [ -z "$signers" ]; then
		echo "E: $signed_binary: Could not find signing subject, sbverify output follows:">&2
		sbverify --list "$_signed_binary" >&2
		exit=1
		continue
	fi

	for signer in "${signers[@]}"; do
		revoked=$(grep -xF "$signer" << EOF
CN=Canonical Ltd. Secure Boot Signing
CN=Canonical Ltd. Secure Boot Signing (2017)
CN=Canonical Ltd. Secure Boot Signing (ESM 2018)
CN=Canonical Ltd. Secure Boot Signing (2019)
CN=Canonical Ltd. Secure Boot Signing (Ubuntu Core 2019)
CN=Canonical Ltd. Secure Boot Signing (2021 v1)
CN=Canonical Ltd. Secure Boot Signing (2021 v2)
CN=Canonical Ltd. Secure Boot Signing (2021 v3)
EOF
	) || true

		if [ "$revoked" ]; then
			if [ -z "$quiet" ]; then
				echo "E: $signed_binary: revoked key $revoked used">&2
			fi
			exit=1
		fi
    done
done
exit $exit

Youez - 2016 - github.com/yon3zu
LinuXploit