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"
This commit is contained in:
Your Name
2021-07-03 17:15:44 +02:00
parent 6b6cd94cec
commit 47fee8df4f

5
dbs.py
View File

@@ -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')