Created
May 17, 2023 13:35
-
-
Save xooxo/4a86d0ff5dc9d5173b50ae6ee5ccc152 to your computer and use it in GitHub Desktop.
see if mach lookup to a service allowed from attached process
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lldb | |
file_path = "reachable_services.txt" | |
debugger = lldb.SBDebugger.Create() | |
interpreter = debugger.GetCommandInterpreter() | |
debugger.Initialize() | |
return_obj = lldb.SBCommandReturnObject() | |
with open(file_path, 'r') as file: | |
for line in file: | |
stripped_line = line.strip() | |
if stripped_line: # Skip empty lines | |
interpreter.HandleCommand('call (int*)bootstrap_lookup(0,"{}")'.format(stripped_line),return_obj) | |
print(return_obj.GetOutput()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment