Uploading scripts for UUID matching

This commit is contained in:
Karmaz95
2024-10-29 22:35:54 +01:00
parent 2a221e77b1
commit e00a60c74b
2 changed files with 57 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
#!/bin/bash
# UUID to search for
search_uuid="9A749379-B169-3F21-B2B0-8EAA50D13820" # Replace with the UUID you're searching for
# Function to check UUIDs using CrimsonUroboros
check_uuid_in_app() {
app_path=$1
# Get the UUIDs using CrimsonUroboros
uuids=$(CrimsonUroboros -b "$app_path" --uuid 2>/dev/null)
# Check if the search UUID is in the output
if echo "$uuids" | grep -qi "$search_uuid"; then
echo "Found: $app_path"
fi
}
# Iterate through all applications in /Applications
for app in /Applications/*.app; do
if [ -d "$app" ]; then
check_uuid_in_app "$app"
fi
done

View File

@@ -0,0 +1,33 @@
#!/bin/bash
# This version uses dwarfdump to get the UUIDs for all architectures
# UUID to search for
search_uuid="5B5E7D61-6508-33C9-AC9B-6146AF7200C0" # Replace with the UUID you're searching for
# Function to check UUIDs using dwarfdump
check_uuid_in_app() {
app_path=$1
executable_path="${app_path}/Contents/MacOS/"*
for exe in $executable_path; do
# Check if the executable exists
if [ -f "$exe" ]; then
# Get the UUIDs for all architectures using dwarfdump
uuids=$(dwarfdump --uuid "$exe" 2>/dev/null)
# Check if the search UUID is in the output, case-insensitive
if echo "$uuids" | grep -qi "$search_uuid"; then
echo "Found: $app_path"
return
fi
fi
done
}
# Iterate through all applications in /Applications
for app in /Applications/*.app; do
if [ -d "$app" ]; then
check_uuid_in_app "$app"
fi
done