modified: README.md
modified: client/main.py modified: database/initdb.py new file: node/main.py modified: server/main.py modified: server/xiaomiandns.py
This commit is contained in:
@@ -5,9 +5,11 @@ if __name__ == '__main__':
|
||||
conn = sqlite3.connect(db_file)
|
||||
cursor = conn.cursor()
|
||||
try:
|
||||
cursor.execute('''CREATE TABLE xiaomiandns(domain TEXT PRIMARY KEY, ip TEXT, pubkey TEXT)''')
|
||||
cursor.execute(
|
||||
'''CREATE TABLE xiaomiandns(domain TEXT PRIMARY KEY, ip TEXT, pubkey TEXT, nodetype TEXT,timestamp DATETIME)''')
|
||||
# node type contain 3 types: client, node, server
|
||||
except sqlite3.OperationalError:
|
||||
print("table xiaomiandns already exists")
|
||||
conn.commit()
|
||||
cursor.close()
|
||||
conn.close()
|
||||
conn.close()
|
||||
|
Reference in New Issue
Block a user