0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

TCC.db のテーブル名・カラム名一覧を取得する

Posted at

シェルスクリプト

TCC_DB_PATH=~/Library/Application\ Support/com.apple.TCC/TCC.db

function execute() {
  sqlite3 "$TCC_DB_PATH" "$1"
}

table_names=`execute ".table"`
for table_name in $table_names; do
  column_names=`execute "SELECT name FROM pragma_table_info('$table_name')"`
  for column_name in $column_names; do
    echo "$table_name:$column_name"
  done
done

出力

access:service
access:client
access:client_type
access:auth_value
access:auth_reason
access:auth_version
access:csreq
access:policy_id
access:indirect_object_identifier_type
access:indirect_object_identifier
access:indirect_object_code_identity
access:flags
access:last_modified
active_policy:client
active_policy:client_type
active_policy:policy_id
expired:service
expired:client
expired:client_type
expired:csreq
expired:last_modified
expired:expired_at
access_overrides:service
admin:key
admin:value
policies:id
policies:bundle_id
policies:uuid
policies:display
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?