Exec Guardian
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
execguard/update_bins.sh

29 lines
947 B

#!/bin/bash
# Directories to search for executables
DIRS=("/usr/bin" "/usr/sbin" "/usr/local/bin")
# Process each directory
for dir in "${DIRS[@]}"; do
# Check if directory exists
if [[ -d "$dir" ]]; then
echo "Processing directory: $dir"
# Find all executable files in the directory
find "$dir" -maxdepth 1 -type f -executable | while read -r program; do
# Get just the program name without path: prog_name=$(basename "$program")
# Run execguard --update on the program
echo "Updating execguard for: $program"
execguard --update "$program"
done
else
echo "Directory not found: $dir" >&2
fi
done
# custom files here:
if [ -x /usr/local/maldetect/maldet ]; then
execguard --update /usr/local/maldetect/maldet
fi
sudo execguard --update /usr/lib/update-notifier/package-data-downloader
echo "Finished processing all directories"