Возможно, что-то есть проблема в именовании пути к каталогу, и я не могу ее понять. Нужна помощь
Каждый раз, когда я пытаюсь запустить этот скрипт с внешнего диска, я получаю эту ошибку:
Код: Выделить всё
Entering directory '/usr/src/linux-headers-6.8.11-amd64'
/usr/src/linux-headers-6.8.11-common/Makefile:157: *** building multiple external modules is not supported. Stop.
make: Leaving directory '/usr/src/linux-headers-6.8.11-amd64'
Код: Выделить всё
# Define the target directory for artifacts
TARGET_DIR="/media/kali/New Volume/FYP/artifacts"
# Function for memory dump creation (Linux Triage)
linux_triage_memory_dump() {
echo "Starting memory dump creation..."
#!/bin/bash
# Define variables
dump_dir="/media/kali/New Volume/FYP/memory_dump"
lime_src_dir="/media/kali/New Volume/FYP/LiME/src"
# Create dump directory if it doesn't exist
mkdir -p "$dump_dir"
# Check for kernel headers
echo "Checking for kernel headers..."
if [ ! -d "/usr/src/linux-headers-$(uname -r)" ]; then
echo "Kernel headers not found. Installing..."
sudo apt-get install linux-headers-$(uname -r) -y
else
echo "Kernel headers are already installed."
fi
# Set directory permissions
echo "Setting directory permissions..."
chmod -R 755 "$lime_src_dir"
# Compile LiME module
echo "Compiling LiME module..."
cd "$lime_src_dir" || exit
if [ ! -f "Makefile" ]; then
echo "Creating Makefile..."
make -C /lib/modules/$(uname -r)/build M="$lime_src_dir" modules
else
echo "Makefile exists, skipping creation."
make clean
make -C /lib/modules/$(uname -r)/build M="$lime_src_dir" modules
fi
# Insert LiME kernel module and start memory dump
echo "Inserting LiME kernel module and starting memory dump..."
sudo insmod "$lime_src_dir/lime.ko" "path=$dump_file" "format=raw" "dump=all" "tcp=off"
# Wait for memory dump to complete
echo "Waiting for memory dump to complete..."
sleep 5 # Adjust sleep time as necessary; this is just a placeholder
# Remove LiME kernel module
echo "Removing LiME kernel module..."
sudo rmmod lime`
Подробнее здесь: https://stackoverflow.com/questions/792 ... make-it-so