mirror of
https://github.com/brmlab/brmdoor_libnfc.git
synced 2025-06-07 16:14:01 +02:00
UID Authenticator
This commit is contained in:
parent
cfabc90911
commit
169e8461d2
3 changed files with 98 additions and 0 deletions
22
create_authenticator_db.py
Executable file
22
create_authenticator_db.py
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Creates and empty sqlite database file for brmdoor_authenticator.UidAuthenticator.
|
||||
|
||||
Give filename as first argument.
|
||||
"""
|
||||
|
||||
import sys
|
||||
import sqlite3
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) < 2:
|
||||
print >> sys.stderr, "You must specify filename as arg1 where the DB is to be created"
|
||||
|
||||
filename = sys.argv[1]
|
||||
conn = sqlite3.connect(filename)
|
||||
cursor = conn.cursor()
|
||||
|
||||
cursor.execute("CREATE TABLE authorized_uids(uid_hex, nick)")
|
||||
conn.commit()
|
||||
conn.close()
|
Loading…
Add table
Add a link
Reference in a new issue