Skip to content

Instantly share code, notes, and snippets.

@erikng
Last active April 19, 2021 22:51
Show Gist options
  • Select an option

  • Save erikng/c2ca04ce2b897397f4c8c333901e4b8d to your computer and use it in GitHub Desktop.

Select an option

Save erikng/c2ca04ce2b897397f4c8c333901e4b8d to your computer and use it in GitHub Desktop.

Revisions

  1. erikng revised this gist Aug 30, 2018. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions kextidentifiers.py
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,8 @@
    #!/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()
  2. erikng revised this gist Jan 10, 2018. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions kextidentifiers.py
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    #!/usr/bin/python

    import sqlite3
    conn = sqlite3.connect('/var/db/SystemPolicyConfiguration/KextPolicy')
    c = conn.cursor()
  3. erikng created this gist Jan 10, 2018.
    8 changes: 8 additions & 0 deletions kextidentifiers.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    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