From 95ef1564bf049d1423049af2009fa88ea054545e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 9 Jul 2023 19:27:16 +0200 Subject: [PATCH] Continued: - source_last_access is the proper configuration key now - some spaces - more average peer count --- config.defaults.json | 2 +- daemon.py | 2 +- templates/views/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config.defaults.json b/config.defaults.json index 5385236..b0c3dbb 100644 --- a/config.defaults.json +++ b/config.defaults.json @@ -18,7 +18,7 @@ "recheck_instance" : 604800, "recheck_block" : 43200, "recheck_nodeinfo" : 604800, - "api_last_access" : 604800, + "source_last_access" : 604800, "misskey_limit" : 100, "error_log_cleanup" : 604800, "write_error_log" : "true", diff --git a/daemon.py b/daemon.py index 499ffc1..c53fcb6 100755 --- a/daemon.py +++ b/daemon.py @@ -84,7 +84,7 @@ def api_scoreboard(mode: str, amount: int): elif mode == "detection_mode": database.cursor.execute("SELECT detection_mode, COUNT(domain) AS cnt FROM instances GROUP BY detection_mode ORDER BY cnt DESC LIMIT ?", [amount]) elif mode == "avg_peers": - database.cursor.execute("SELECT software, AVG(total_peers) AS average FROM instances WHERE software IS NOT NULL GROUP BY software HAVING average>0 ORDER BY average DESC LIMIT ?", [amount]) + database.cursor.execute("SELECT software, AVG(total_peers) AS average FROM instances WHERE software IS NOT NULL GROUP BY software HAVING average > 0 ORDER BY average DESC LIMIT ?", [amount]) elif mode == "obfuscator": database.cursor.execute("SELECT software, COUNT(domain) AS cnt FROM instances WHERE has_obfuscation = 1 GROUP BY software ORDER BY cnt DESC LIMIT ?", [amount]) elif mode == "obfuscation": diff --git a/templates/views/index.html b/templates/views/index.html index 65c0c2b..aad268e 100644 --- a/templates/views/index.html +++ b/templates/views/index.html @@ -60,7 +60,7 @@
  • Commands
  • Error codes
  • Detection modes
  • -
  • Average peers
  • +
  • Average peers
  • Obfuscating software
  • Obfuscation statistics
  • Block level statistics
  • -- 2.39.5