modified: README.md

new file:   client/dnssender.py
	new file:   client/main.py
	new file:   database/dns.db
	new file:   database/initdb.py
	new file:   server/main.py
	new file:   server/xiaomiandns.py
This commit is contained in:
2023-03-19 10:13:45 +08:00
parent c304e2e994
commit 8131595d02
7 changed files with 298 additions and 1 deletions

BIN
database/dns.db Normal file

Binary file not shown.

13
database/initdb.py Normal file
View File

@@ -0,0 +1,13 @@
import sqlite3
db_file = 'dns.db'
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)''')
except sqlite3.OperationalError:
print("table xiaomiandns already exists")
conn.commit()
cursor.close()
conn.close()