mirror of
https://github.com/Karmaz95/Snake_Apple.git
synced 2026-03-30 14:00:16 +02:00
Uploading scripts for UUID matching
This commit is contained in:
24
IX. TCC/custom/app_UUID_finder_v1.sh
Normal file
24
IX. TCC/custom/app_UUID_finder_v1.sh
Normal 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
|
||||
33
IX. TCC/custom/app_UUID_finder_v2.sh
Normal file
33
IX. TCC/custom/app_UUID_finder_v2.sh
Normal 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
|
||||
Reference in New Issue
Block a user