Skip to content

Instantly share code, notes, and snippets.

@erikng
Created August 14, 2018 16:46
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikng/6475a89c60303d1e16c0c1d982346267 to your computer and use it in GitHub Desktop.
Save erikng/6475a89c60303d1e16c0c1d982346267 to your computer and use it in GitHub Desktop.
allowed_tcc_binaries.py
#!/usr/bin/python
# In order for this to work, you will need to go to System Preferences in Mojave -> Security & Privacy -> Privacy -> Full Disk Access and grant Terminal.app permissions
import sqlite3
conn = sqlite3.connect('/Library/Application Support/com.apple.TCC/TCC.db')
c = conn.cursor()
query = 'SELECT * FROM access'
c.execute(query)
allowed_binaries = c.fetchall()
for binary in allowed_binaries:
print binary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment