2017-07-10 05:44:58 +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,
|
2017-07-10 14:27:45 +00:00
|
|
|
"pkey" text
|
2017-07-10 05:44:58 +00:00
|
|
|
)''')
|
|
|
|
|
|
|
|
db_conn.execute('''CREATE TABLE "hosts" (
|
|
|
|
"id" integer PRIMARY KEY,
|
|
|
|
"ip" text,
|
|
|
|
"hostname" text,
|
|
|
|
"port" integer,
|
|
|
|
"server_banner" text
|
|
|
|
)''')
|