2022-07-18 23:59:14 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
2017-10-25 02:08:19 +00:00
|
|
|
class database:
|
|
|
|
|
|
|
|
def __init__(self, conn):
|
|
|
|
self.conn = conn
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def db_schema(db_conn):
|
|
|
|
db_conn.execute('''CREATE TABLE "credentials" (
|
|
|
|
"id" integer PRIMARY KEY,
|
|
|
|
"username" text,
|
|
|
|
"password" text
|
|
|
|
)''')
|
|
|
|
|
|
|
|
db_conn.execute('''CREATE TABLE "hosts" (
|
|
|
|
"id" integer PRIMARY KEY,
|
|
|
|
"ip" text,
|
|
|
|
"hostname" text,
|
|
|
|
"port" integer
|
|
|
|
)''')
|