16 lines
424 B
Python
16 lines
424 B
Python
# Import dependencies
|
|
|
|
import sqlite3
|
|
import os
|
|
|
|
# Get the current working directory
|
|
main_directory = os.getcwd()
|
|
|
|
|
|
# Define cache function
|
|
def cache_keys(pssh: str, keys: str):
|
|
dbconnection = sqlite3.connect(f"{main_directory}\\keys\\database.db")
|
|
dbcursor = dbconnection.cursor()
|
|
dbcursor.execute("INSERT or REPLACE INTO database VALUES (?, ?)", (pssh, keys))
|
|
dbconnection.commit()
|
|
dbconnection.close() |