Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Define the URL and file names
- ISO_URL="https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.6.0-amd64-netinst.iso"
- ISO_FILE="debian-12.6.0-amd64-netinst.iso"
- ISO_MOUNT_DIR="iso_mount"
- # Create a directory for mounting the ISO
- mkdir -p "$ISO_MOUNT_DIR"
- # Download the ISO file
- echo "Downloading ISO..."
- wget -O "$ISO_FILE" "$ISO_URL"
- # Check if the ISO downloaded successfully
- if [[ $? -ne 0 ]]; then
- echo "Failed to download ISO."
- exit 1
- fi
- # Mount the ISO
- echo "Mounting ISO..."
- sudo mount -o loop "$ISO_FILE" "$ISO_MOUNT_DIR"
- # Check if the mounting was successful
- if [[ $? -ne 0 ]]; then
- echo "Failed to mount ISO."
- exit 1
- fi
- # Run objdump on the ISO contents
- echo "Running objdump..."
- find "$ISO_MOUNT_DIR" -type f -exec objdump -a {} \;
- # Unmount the ISO
- echo "Unmounting ISO..."
- sudo umount "$ISO_MOUNT_DIR"
- # Remove the mount directory
- rmdir "$ISO_MOUNT_DIR"
- echo "Done."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement