Skip to content

Instantly share code, notes, and snippets.

@cicdw
Created October 13, 2019 19:19
Show Gist options
  • Save cicdw/dae9d21b07c5946506fb3f7bb56760aa to your computer and use it in GitHub Desktop.
Save cicdw/dae9d21b07c5946506fb3f7bb56760aa to your computer and use it in GitHub Desktop.
Creates a SQLite Table for storing SSH attempts
from prefect.tasks.database.sqlite import SQLiteScript
create_script = "CREATE TABLE IF NOT EXISTS SSHATTEMPTS (timestamp TEXT, username TEXT, port INTEGER, city TEXT, country TEXT, latitude REAL, longitude REAL)"
create_table = SQLiteScript(
db="ssh.db", script=create_script, name="Create Database and Table"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment