From e00a60c74bb7b97e67c519a7bb401ceeb6d361fa Mon Sep 17 00:00:00 2001 From: Karmaz95 Date: Tue, 29 Oct 2024 22:35:54 +0100 Subject: [PATCH] Uploading scripts for UUID matching --- IX. TCC/custom/app_UUID_finder_v1.sh | 24 ++++++++++++++++++++ IX. TCC/custom/app_UUID_finder_v2.sh | 33 ++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 IX. TCC/custom/app_UUID_finder_v1.sh create mode 100644 IX. TCC/custom/app_UUID_finder_v2.sh diff --git a/IX. TCC/custom/app_UUID_finder_v1.sh b/IX. TCC/custom/app_UUID_finder_v1.sh new file mode 100644 index 0000000..060188b --- /dev/null +++ b/IX. TCC/custom/app_UUID_finder_v1.sh @@ -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 \ No newline at end of file diff --git a/IX. TCC/custom/app_UUID_finder_v2.sh b/IX. TCC/custom/app_UUID_finder_v2.sh new file mode 100644 index 0000000..d68bc9f --- /dev/null +++ b/IX. TCC/custom/app_UUID_finder_v2.sh @@ -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 \ No newline at end of file