From 47fee8df4f4563ebbce91159ba8ed5bb7a45e570 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 3 Jul 2021 17:15:44 +0200 Subject: [PATCH] proxylist database: add "mitm" row update any existing db as follow: sqlite3 proxies.sqlite "alter table proxylist add mitm int" sqlite3 proxies.sqlite "update proxylist set mitm=0" --- dbs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dbs.py b/dbs.py index c3c53a2..24fdc49 100644 --- a/dbs.py +++ b/dbs.py @@ -11,6 +11,7 @@ def create_table_if_not_exists(sqlite, dbname): tested INT, dronebl INT, proto TEXT, + mitm INT, success_count INT, total_duration INT)""") @@ -33,9 +34,9 @@ def insert_proxies(proxydb, proxies, url): new = [] for p in proxies: - new.append((timestamp,p,3,0,0,0)) + new.append((timestamp,p,3,0,0,0,0)) - proxydb.executemany('INSERT OR IGNORE INTO proxylist (added,proxy,failed,tested,success_count,total_duration) VALUES (?,?,?,?,?,?)', new) + proxydb.executemany('INSERT OR IGNORE INTO proxylist (added,proxy,failed,tested,success_count,total_duration,mitm) VALUES (?,?,?,?,?,?,?)', new) proxydb.commit() _log('+%d proxy/ies from %s' % (len(proxies), url), 'added')