"hexbear.net" : "Is a Lemmy instance with malicious JavaScript code (shell commands)",
"mastodon.n41.lat" : "Somehow this instance repeatedly causes an OOM here",
"fb.me" : "Facebook websites are never Fediverse instances",
+ "osl.academy" : "Parked domain, no fediverse instance",
"icolectiva.org" : "Parked domain, no fediverse instance",
"blombus.com" : "Parked domain, no fediverse instance",
"eliotberriot.com" : "Parked domain, no fediverse instance",
elif path == "":
raise ValueError("Parameter 'path' is empty")
elif not path.startswith("/"):
- raise ValueError("path='{path}' does not start with / but should")
+ raise ValueError(f"path='{path}' does not start with / but should")
software = None
elif path == "":
raise ValueError("Parameter 'path' is empty")
elif not path.startswith("/"):
- raise ValueError("path='{path}' does not start with / but should")
+ raise ValueError(f"path='{path}' does not start with / but should")
elif not isinstance(data, str):
raise ValueError(f"data[]='{type(data)}' is not of type 'str'")
elif not isinstance(headers, dict):
elif path == "":
raise ValueError("Parameter 'path' is empty")
elif not path.startswith("/"):
- raise ValueError("path='{path}' does not start with / but should")
+ raise ValueError(f"path='{path}' does not start with / but should")
elif not isinstance(headers, dict):
raise ValueError(f"headers[]='{type(headers)}' is not of type 'list'")
elif not isinstance(timeout, tuple):
elif path == "":
raise ValueError("Parameter 'path' is empty")
elif not path.startswith("/"):
- raise ValueError("path='{path}' does not start with / but should")
+ raise ValueError(f"path='{path}' does not start with / but should")
elif not isinstance(headers, dict):
raise ValueError(f"headers[]='{type(headers)}' is not of type 'dict'")
elif not isinstance(timeout, tuple):
raise ValueError(f"path[]='{type(path)}' is not of type 'str'")
elif path == "":
raise ValueError("Parameter 'path' is empty")
- elif not path.startswith("/"):
- raise ValueError("path='{path}' does not start with / but should")
+ elif path is not None and not path.startswith("/"):
+ raise ValueError(f"path='{path}' does not start with / but should")
elif not isinstance(software, str) and software is not None:
raise ValueError(f"software[]='{type(software)}' is not of type 'str'")
elif software == "":
#!/bin/sh
MODE=""
-DOMAINS=""
+DOMAIN_LIST=""
SOFTWARE_LIST=""
if [ "$1" = "--help" ]
exit 255
elif [ -n "$1" -a -f "$1" ]
then
- DOMAINS=$(cat "$1")
+ DOMAIN_LIST=$(cat "$1")
MODE="file"
elif [ "$1" = "--nodeinfo" ]
then
- DOMAINS=$(sqlite3 blocks.db "SELECT domain FROM instances WHERE software IS NULL AND nodeinfo_url IS NOT NULL ORDER BY last_updated ASC;")
+ DOMAIN_LIST=$(sqlite3 blocks.db "SELECT domain FROM instances WHERE software IS NULL AND nodeinfo_url IS NOT NULL ORDER BY last_updated ASC;")
MODE="nodeinfo"
elif [ "$1" = "--timeout" ]
then
- DOMAINS=$(sqlite3 blocks.db "SELECT domain FROM instances WHERE last_error_details LIKE '%Timeout%' ORDER BY last_updated ASC;")
+ DOMAIN_LIST=$(sqlite3 blocks.db "SELECT domain FROM instances WHERE last_error_details LIKE '%Timeout%' ORDER BY last_updated ASC;")
MODE="timeout"
elif [ "$1" = "--software" -a -f "software.txt" ]
then
MODE="software"
elif [ "$1" = "--generator" ]
then
- DOMAINS=$(sqlite3 blocks.db "SELECT domain FROM instances WHERE detection_mode='GENERATOR' ORDER BY last_updated ASC;")
+ DOMAIN_LIST=$(sqlite3 blocks.db "SELECT domain FROM instances WHERE detection_mode='GENERATOR' ORDER BY last_updated ASC;")
MODE="generator"
elif [ "$1" = "--same" ]
then
- DOMAINS=$(sqlite3 blocks.db "SELECT domain FROM instances WHERE domain=software ORDER BY last_updated ASC;")
+ DOMAIN_LIST=$(sqlite3 blocks.db "SELECT domain FROM instances WHERE domain=software ORDER BY last_updated ASC;")
MODE="same"
else
- DOMAINS=$(sqlite3 blocks.db "SELECT domain FROM instances WHERE software IS NULL AND nodeinfo_url IS NOT NULL ORDER BY last_updated ASC;")
+ DOMAIN_LIST=$(sqlite3 blocks.db "SELECT domain FROM instances WHERE software IS NULL AND nodeinfo_url IS NOT NULL ORDER BY last_updated ASC;")
fi
-if [ -z "${DOMAINS}" -a -z "${SOFTWARE_LIST}" ]
+if [ -z "${DOMAIN_LIST}" -a -z "${SOFTWARE_LIST}" ]
then
echo "$0: No domains or software found! MODE='${MODE}'"
exit 255
fi
-if [ -n "${DOMAINS}" ]
+if [ -n "${DOMAIN_LIST}" ]
then
- for DOMAIN in ${DOMAINS};
+ for DOMAIN in ${DOMAIN_LIST};
do
echo "$0: DOMAIN='${DOMAIN}'"
if [ -n "$1" -a -z "${MODE}" ]