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:
5
dbs.py
5
dbs.py
@@ -11,6 +11,7 @@ def create_table_if_not_exists(sqlite, dbname):
|
|||||||
tested INT,
|
tested INT,
|
||||||
dronebl INT,
|
dronebl INT,
|
||||||
proto TEXT,
|
proto TEXT,
|
||||||
|
mitm INT,
|
||||||
success_count INT,
|
success_count INT,
|
||||||
total_duration INT)""")
|
total_duration INT)""")
|
||||||
|
|
||||||
@@ -33,9 +34,9 @@ def insert_proxies(proxydb, proxies, url):
|
|||||||
|
|
||||||
new = []
|
new = []
|
||||||
for p in proxies:
|
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()
|
proxydb.commit()
|
||||||
|
|
||||||
_log('+%d proxy/ies from %s' % (len(proxies), url), 'added')
|
_log('+%d proxy/ies from %s' % (len(proxies), url), 'added')
|
||||||
|
|||||||
Reference in New Issue
Block a user