Skip to content

Instantly share code, notes, and snippets.

@nmcspadden
Created February 26, 2016 21:22
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 nmcspadden/8119d39b9d04695a31ad to your computer and use it in GitHub Desktop.
Save nmcspadden/8119d39b9d04695a31ad to your computer and use it in GitHub Desktop.
#!/usr/bin/python
import os
import sqlite3
tccpath = '/Library/Application Support/com.apple.TCC/TCC.db'
connection = sqlite3.connect(tccpath)
c = connection.cursor()
values = ('kTCCServiceAccessibility', 'com.rescuetime.RescueTime', 0)
c.execute('INSERT or REPLACE into access values(?, ?, ?, 1, 1, NULL, NULL)', values)
connection.commit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment