searchres = fba.cursor.fetchone()
- print(f"DEBUG: searchres[]='{type(searchres)}'")
+ # DEBUG: print(f"DEBUG: searchres[]='{type(searchres)}'")
if searchres is None:
print(f"WARNING: Cannot deobsfucate blocked='{blocked}' - SKIPPED!")
continue
searchres = fba.cursor.fetchone()
- print(f"DEBUG: searchres[]='{type(searchres)}'")
+ # DEBUG: print(f"DEBUG: searchres[]='{type(searchres)}'")
if searchres is None:
print(f"WARNING: Cannot deobsfucate blocked='{blocked}' - SKIPPED!")
continue
# Init peers variable
peers = list()
+ headers = tuple()
# DEBUG: print(f"DEBUG: Checking CSRF for domain='{domain}'")
- headers = csrf.determine(domain, dict())
+ try:
+ headers = csrf.determine(domain, dict())
+ except network.exceptions as exception:
+ print(f"WARNING: Exception '{type(exception)}' during checking CSRF - EXIT!")
+ return
# DEBUG: print(f"DEBUG: Fetching peers from '{domain}',software='{software}' ...")
data = network.get_json_api(
# DEBUG: print("DEBUG: nodeinfo()={len(nodeinfo))} - EXIT!")
return nodeinfo
+ headers = tuple()
+
# DEBUG: print(f"DEBUG: Checking CSRF for domain='{domain}'")
- headers = csrf.determine(domain, dict())
+ try:
+ headers = csrf.determine(domain, dict())
+ except network.exceptions as exception:
+ print(f"WARNING: Exception '{type(exception)}' during checking CSRF - EXIT!")
+ return
request_paths = [
"/nodeinfo/2.1.json",
elif domain == "":
raise ValueError("Parameter 'domain' is empty")
+ headers = tuple()
+
# DEBUG: print(f"DEBUG: Checking CSRF for domain='{domain}'")
- headers = csrf.determine(domain, dict())
+ try:
+ headers = csrf.determine(domain, dict())
+ except network.exceptions as exception:
+ print(f"WARNING: Exception '{type(exception)}' during checking CSRF - EXIT!")
+ return
# DEBUG: print("DEBUG: Fetching .well-known info for domain:", domain)
data = network.get_json_api(
elif domain == "":
raise ValueError("Parameter 'domain' is empty")
- print(f"DEBUG: Checking CSRF for domain='{domain}'")
- headers = csrf.determine(domain, dict())
+ headers = tuple()
+
+ # DEBUG: print(f"DEBUG: Checking CSRF for domain='{domain}'")
+ try:
+ headers = csrf.determine(domain, dict())
+ except network.exceptions as exception:
+ print(f"WARNING: Exception '{type(exception)}' during checking CSRF - EXIT!")
+ return
peers = list()
try:
elif nodeinfo_url == "":
raise ValueError("Parameter 'nodeinfo_url' is empty")
- print(f"DEBUG: Checking CSRF for domain='{domain}'")
- headers = csrf.determine(domain, dict())
+ headers = tuple()
+
+ # DEBUG: print(f"DEBUG: Checking CSRF for domain='{domain}'")
+ try:
+ headers = csrf.determine(domain, dict())
+ except network.exceptions as exception:
+ print(f"WARNING: Exception '{type(exception)}' during checking CSRF - EXIT!")
+ return
try:
# json endpoint for newer mastodongs
)
searchres = fba.cursor.fetchone()
- print(f"DEBUG: searchres[]='{type(searchres)}'")
+ # DEBUG: print(f"DEBUG: searchres[]='{type(searchres)}'")
if searchres is None:
print(f"WARNING: Cannot deobsfucate blocked='{blocked}',blocked_hash='{blocked_hash}' - SKIPPED!")
continue
peers = list()
offset = 0
step = config.get("misskey_limit")
- headers = csrf.determine(domain, {"Origin": domain})
+ headers = tuple()
+
+ # DEBUG: print(f"DEBUG: Checking CSRF for domain='{domain}'")
+ try:
+ headers = csrf.determine(domain, dict())
+ except network.exceptions as exception:
+ print(f"WARNING: Exception '{type(exception)}' during checking CSRF - EXIT!")
+ return
# iterating through all "suspended" (follow-only in its terminology)
# instances page-by-page, since that troonware doesn't support
offset = 0
step = config.get("misskey_limit")
- headers = csrf.determine(domain, {"Origin": domain})
+ headers = tuple()
+
+ # DEBUG: print(f"DEBUG: Checking CSRF for domain='{domain}'")
+ try:
+ headers = csrf.determine(domain, dict())
+ except network.exceptions as exception:
+ print(f"WARNING: Exception '{type(exception)}' during checking CSRF - EXIT!")
+ return
# iterating through all "suspended" (follow-only in its terminology)
# instances page-by-page since it doesn't support sending them all at once
raise ValueError("Parameter 'domain' is empty")
print(f"DEBUG: domain='{domain}' is a PeerTube, fetching JSON ...")
- peers = list()
- start = 0
+ peers = list()
+ start = 0
+ headers = tuple()
print(f"DEBUG: Checking CSRF for domain='{domain}'")
- headers = csrf.determine(domain, dict())
+ try:
+ headers = csrf.determine(domain, dict())
+ except network.exceptions as exception:
+ print(f"WARNING: Exception '{type(exception)}' during checking CSRF - EXIT!")
+ return
for mode in ["followers", "following"]:
print(f"DEBUG: domain='{domain}',mode='{mode}'")
)
searchres = fba.cursor.fetchone()
- print(f"DEBUG: searchres[]='{type(searchres)}'")
+ # DEBUG: print(f"DEBUG: searchres[]='{type(searchres)}'")
if searchres is None:
print(f"WARNING: Cannot deobsfucate blocked='{blocked}' - SKIPPED!")
continue