Skip to content

Instantly share code, notes, and snippets.

@papamoose
Forked from erikng/kextidentifiers.py
Created August 7, 2019 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save papamoose/da4cc8e57a20133943ddabed826f48bd to your computer and use it in GitHub Desktop.
Save papamoose/da4cc8e57a20133943ddabed826f48bd to your computer and use it in GitHub Desktop.
kextidentifiers.py
#!/usr/bin/python
# For mojave only
# 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('/var/db/SystemPolicyConfiguration/KextPolicy')
c = conn.cursor()
query = 'SELECT * FROM kext_policy'
c.execute(query)
kexts = c.fetchall()
for kext in kexts:
print kext
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment