-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0047d6b
commit 3abf23b
Showing
12 changed files
with
56 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
sqlite3 badger.sqlite3 -batch 'SELECT t.base, | ||
sqlite3 badger.sqlite3 -batch "SELECT t.base, | ||
COUNT(DISTINCT s.fqdn) num_sites | ||
FROM tracker t | ||
JOIN tracking tr ON tr.tracker_id = t.id | ||
JOIN site s ON s.id = tr.site_id | ||
JOIN tracking_type tt ON tt.id = tr.tracking_type_id | ||
JOIN scan ON scan.id = tr.scan_id | ||
WHERE tt.name = "beacon" | ||
AND scan.date > DATETIME("now", "-30 day") | ||
WHERE tt.name = 'beacon' | ||
AND scan.date > DATETIME('now', '-30 day') | ||
AND t.id NOT IN (SELECT t2.id | ||
FROM tracker t2 | ||
JOIN tracking tr2 ON tr2.tracker_id = t2.id | ||
JOIN scan scan2 ON scan2.id = tr2.scan_id | ||
LEFT JOIN tracking_type tt2 ON tt2.id = tr2.tracking_type_id | ||
WHERE scan2.date > DATETIME("now", "-30 day") | ||
AND (tt2.name != "beacon" | ||
WHERE scan2.date > DATETIME('now', '-30 day') | ||
AND (tt2.name != 'beacon' | ||
OR tr2.tracking_type_id IS NULL) | ||
GROUP BY t2.id | ||
HAVING COUNT(tr2.site_id) > 2) | ||
GROUP BY t.id | ||
ORDER BY num_sites DESC | ||
LIMIT 30' | column -s '|' -t | ||
LIMIT 30" | column -s '|' -t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
sqlite3 badger.sqlite3 -batch 'SELECT t.base, | ||
sqlite3 badger.sqlite3 -batch "SELECT t.base, | ||
COUNT(DISTINCT site.id) num_sites, | ||
COUNT(DISTINCT s.id) num_scans | ||
FROM tracker t | ||
JOIN tracking tr ON tr.tracker_id = t.id | ||
JOIN scan s ON s.id = tr.scan_id | ||
JOIN site ON site.id = tr.site_id | ||
WHERE s.daily_scan = 1 | ||
AND s.date > DATETIME("now", "-12 month") | ||
AND s.date <= DATETIME("now", "-30 day") | ||
AND s.date > DATETIME('now', '-12 month') | ||
AND s.date <= DATETIME('now', '-30 day') | ||
AND t.id NOT IN (SELECT t2.id | ||
FROM tracker t2 | ||
JOIN tracking tr2 ON tr2.tracker_id = t2.id | ||
JOIN scan s2 ON s2.id = tr2.scan_id | ||
WHERE s2.daily_scan = 1 | ||
AND s2.date > DATETIME("now", "-30 day")) | ||
AND s2.date > DATETIME('now', '-30 day')) | ||
GROUP BY t.id | ||
ORDER BY num_sites DESC, num_scans DESC | ||
LIMIT 30' | column -s '|' -t | ||
LIMIT 30" | column -s '|' -t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
sqlite3 badger.sqlite3 -batch 'SELECT t.base, COUNT(DISTINCT site.id) num_sites, COUNT(DISTINCT s.id) num_scans | ||
sqlite3 badger.sqlite3 -batch "SELECT t.base, COUNT(DISTINCT site.id) num_sites, COUNT(DISTINCT s.id) num_scans | ||
FROM tracker t | ||
JOIN tracking tr ON tr.tracker_id = t.id | ||
JOIN scan s ON s.id = tr.scan_id | ||
JOIN site ON site.id = tr.site_id | ||
WHERE s.daily_scan = 1 | ||
AND s.date > DATETIME("now", "-24 month") | ||
AND s.date <= DATETIME("now", "-12 month") | ||
AND s.date > DATETIME('now', '-24 month') | ||
AND s.date <= DATETIME('now', '-12 month') | ||
AND t.id NOT IN (SELECT t2.id | ||
FROM tracker t2 | ||
JOIN tracking tr2 ON tr2.tracker_id = t2.id | ||
JOIN scan s2 ON s2.id = tr2.scan_id | ||
WHERE s2.daily_scan = 1 AND s2.date > DATETIME("now", "-12 month")) | ||
WHERE s2.daily_scan = 1 AND s2.date > DATETIME('now', '-12 month')) | ||
GROUP BY t.id | ||
ORDER BY num_sites DESC, num_scans DESC | ||
LIMIT 30' | column -s '|' -t | ||
LIMIT 30" | column -s '|' -t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
sqlite3 badger.sqlite3 -batch 'SELECT t.base, | ||
sqlite3 badger.sqlite3 -batch "SELECT t.base, | ||
COUNT(DISTINCT site.id) num_sites, | ||
COUNT(DISTINCT s.id) num_scans | ||
FROM tracker t | ||
JOIN tracking tr ON tr.tracker_id = t.id | ||
JOIN scan s ON s.id = tr.scan_id | ||
JOIN site ON site.id = tr.site_id | ||
WHERE s.daily_scan = 1 | ||
AND s.date > DATETIME("now", "-30 day") | ||
AND s.date > DATETIME('now', '-30 day') | ||
AND t.id NOT IN (SELECT t2.id | ||
FROM tracker t2 | ||
JOIN tracking tr2 ON tr2.tracker_id = t2.id | ||
JOIN scan s2 ON s2.id = tr2.scan_id | ||
WHERE s2.daily_scan = 1 | ||
AND s2.date > DATETIME("now", "-12 month") | ||
AND s2.date <= DATETIME("now", "-30 day")) | ||
AND s2.date > DATETIME('now', '-12 month') | ||
AND s2.date <= DATETIME('now', '-30 day')) | ||
GROUP BY t.id | ||
ORDER BY num_sites DESC, num_scans DESC | ||
LIMIT 30' | column -s '|' -t | ||
LIMIT 30" | column -s '|' -t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
sqlite3 badger.sqlite3 -batch 'SELECT t.base, | ||
sqlite3 badger.sqlite3 -batch "SELECT t.base, | ||
COUNT(DISTINCT site.id) num_sites, | ||
COUNT(DISTINCT s.id) num_scans | ||
FROM tracker t | ||
JOIN tracking tr ON tr.tracker_id = t.id | ||
JOIN scan s ON s.id = tr.scan_id | ||
JOIN site ON site.id = tr.site_id | ||
WHERE s.daily_scan = 1 | ||
AND s.date > DATETIME("now", "-1 year") | ||
AND s.date > DATETIME('now', '-1 year') | ||
AND t.id NOT IN (SELECT t2.id | ||
FROM tracker t2 | ||
JOIN tracking tr2 ON tr2.tracker_id = t2.id | ||
JOIN scan s2 ON s2.id = tr2.scan_id | ||
WHERE s2.daily_scan = 1 | ||
AND s2.date > DATETIME("now", "-2 year") | ||
AND s2.date <= DATETIME("now", "-1 year")) | ||
AND s2.date > DATETIME('now', '-2 year') | ||
AND s2.date <= DATETIME('now', '-1 year')) | ||
GROUP BY t.id | ||
ORDER BY num_sites DESC, num_scans DESC | ||
LIMIT 30' | column -s '|' -t | ||
LIMIT 30" | column -s '|' -t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
sqlite3 badger.sqlite3 -batch 'SELECT t.base, | ||
sqlite3 badger.sqlite3 -batch "SELECT t.base, | ||
COUNT(DISTINCT s.fqdn) num_sites | ||
FROM tracker t | ||
JOIN tracking tr ON tr.tracker_id = t.id | ||
JOIN site s ON s.id = tr.site_id | ||
JOIN tracking_type tt ON tt.id = tr.tracking_type_id | ||
JOIN scan ON scan.id = tr.scan_id | ||
WHERE tt.name = "pixelcookieshare" | ||
AND scan.date > DATETIME("now", "-30 day") | ||
WHERE tt.name = 'pixelcookieshare' | ||
AND scan.date > DATETIME('now', '-30 day') | ||
AND t.id NOT IN (SELECT t2.id | ||
FROM tracker t2 | ||
JOIN tracking tr2 ON tr2.tracker_id = t2.id | ||
JOIN scan scan2 ON scan2.id = tr2.scan_id | ||
LEFT JOIN tracking_type tt2 ON tt2.id = tr2.tracking_type_id | ||
WHERE scan2.date > DATETIME("now", "-30 day") | ||
AND (tt2.name != "pixelcookieshare" | ||
WHERE scan2.date > DATETIME('now', '-30 day') | ||
AND (tt2.name != 'pixelcookieshare' | ||
OR tr2.tracking_type_id IS NULL) | ||
GROUP BY t2.id | ||
HAVING COUNT(tr2.site_id) > 2) | ||
GROUP BY t.id | ||
ORDER BY num_sites DESC | ||
LIMIT 30' | column -s '|' -t | ||
LIMIT 30" | column -s '|' -t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
sqlite3 badger.sqlite3 -batch 'SELECT s.fqdn AS site, | ||
sqlite3 badger.sqlite3 -batch "SELECT s.fqdn AS site, | ||
COUNT(*) num_records, | ||
GROUP_CONCAT(DISTINCT t.base) AS fingerprinters | ||
FROM site s | ||
JOIN tracking tr ON tr.site_id = s.id | ||
JOIN tracker t ON t.id = tr.tracker_id | ||
JOIN tracking_type tt ON tt.id = tr.tracking_type_id | ||
JOIN scan ON scan.id = tr.scan_id | ||
WHERE tt.name = "canvas" | ||
AND scan.date > DATETIME("now", "-30 day") | ||
WHERE tt.name = 'canvas' | ||
AND scan.date > DATETIME('now', '-30 day') | ||
GROUP BY s.id | ||
ORDER BY num_records DESC, | ||
COUNT(DISTINCT t.base) DESC' | column -s '|' -t | ||
COUNT(DISTINCT t.base) DESC" | column -s '|' -t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters