website: demo household and the admin screenshots it produced
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
"""Print the id of the newest blocked app-measurement.com lookup from the iPhone: the query the
|
||||
detail screenshot shows. usage: blocked_query_id.py DATA_DIR"""
|
||||
import sqlite3
|
||||
import sys
|
||||
|
||||
row = sqlite3.connect(f"file:{sys.argv[1]}/querylog.db?mode=ro", uri=True).execute(
|
||||
"SELECT q.id FROM query_log q JOIN domains d ON d.id = q.domain_id"
|
||||
" WHERE q.client_ip = '192.168.50.52' AND q.policy_reason = 'blocklist_domain'"
|
||||
" AND d.domain = 'app-measurement.com' ORDER BY q.id DESC LIMIT 1"
|
||||
).fetchone()
|
||||
if row is None:
|
||||
sys.exit("no blocked app-measurement.com lookup from 192.168.50.52 in the log yet")
|
||||
print(row[0])
|
||||
Reference in New Issue
Block a user