]> git.mxchange.org Git - fba.git/log
fba.git
16 months agoContinued:
Roland Häder [Thu, 22 Jun 2023 23:10:48 +0000 (01:10 +0200)]
Continued:
- removed unused imports

16 months agoContinued:
Roland Häder [Thu, 22 Jun 2023 22:46:40 +0000 (00:46 +0200)]
Continued:
- added metrics for blocking levels

16 months agoContinued:
Roland Häder [Thu, 22 Jun 2023 22:32:33 +0000 (00:32 +0200)]
Continued:
- mapped 'suspended' to 'suspend'
- mapped 'silenced' to 'silence'
- deny 'suspended'/'silenced' in blocks model functions

16 months agoContinued:
Roland Häder [Thu, 22 Jun 2023 21:57:38 +0000 (23:57 +0200)]
Continued:
- again tpzo fixed:
  ALTER TABLE instances RENAME has_obfucation TO has_obfuscation

16 months agoContinued:
Roland Häder [Thu, 22 Jun 2023 20:41:30 +0000 (22:41 +0200)]
Continued:
- also include Friendica

16 months agoContinued:
Roland Häder [Thu, 22 Jun 2023 19:30:20 +0000 (21:30 +0200)]
Continued:
- it is 'blocked' not 'blocker' (current domain in fetch_blocks() function)

16 months agoContinued:
Roland Häder [Thu, 22 Jun 2023 19:25:50 +0000 (21:25 +0200)]
Continued:
- these fetch_blocks() must return a list()

16 months agoContinued:
Roland Häder [Thu, 22 Jun 2023 19:19:00 +0000 (21:19 +0200)]
Continued:
- don't re-check/tidy-up block reason and domain if already done

16 months agoContinued:
Roland Häder [Thu, 22 Jun 2023 19:09:45 +0000 (21:09 +0200)]
Continued:
- rewrote fetch_blocks() so always a list() is being returned
- also don't commit so often to database
- added report.sh and ignored generated report.txt

16 months agoContinued:
Roland Häder [Thu, 22 Jun 2023 16:41:53 +0000 (18:41 +0200)]
Continued:
- tpzo fixed, you have to run following SQL:
  ALTER TABLE instances RENAME has_obsfucation TO has_obfucation

16 months agoContinued:
Roland Häder [Thu, 22 Jun 2023 16:24:48 +0000 (18:24 +0200)]
Continued:
- CSS notice box added
- text aligned to left, header to centered
- rounded corners look beautiful!

16 months agoContinued:
Roland Häder [Thu, 22 Jun 2023 16:15:09 +0000 (18:15 +0200)]
Continued:
- added obsfucation metrics, only pleroma and mastodon are currently
  obsfucating their block list
- so also reflect this here

16 months agoContinued:
Roland Häder [Thu, 22 Jun 2023 16:03:49 +0000 (18:03 +0200)]
Continued:
- need to set has_obsfucation = False first, then later when obsfucated domains
  are found set it to True
- only find entries with has_obsfucation=1

16 months agoContinued:
Roland Häder [Thu, 22 Jun 2023 15:36:51 +0000 (17:36 +0200)]
Continued:
- also expose this flag in relation to used software (currently only mastodon
  and pleroma obsfucate)

16 months agoContinued:
Roland Häder [Thu, 22 Jun 2023 15:23:02 +0000 (17:23 +0200)]
Continued:
- added column has_obsfucation for tracking if instances uses obsfucation in
  their block list
- please run this SQL:
  ALTER TABLE instances ADD has_obsfucation TINYINT(1) NULL DEFAULT NULL
- sorted links

16 months agoContinued:
Roland Häder [Thu, 22 Jun 2023 15:00:42 +0000 (17:00 +0200)]
Continued:
- moved links to "include" template and generalized them there

16 months agoContinued:
Roland Häder [Thu, 22 Jun 2023 14:25:58 +0000 (16:25 +0200)]
Continued:
- don't check domain with blacklist before it has been deobsfucated

16 months agoContinued:
Roland Häder [Thu, 22 Jun 2023 05:06:01 +0000 (07:06 +0200)]
Continued:
- rewrote more logging messages from f-masked to lazy '%'

16 months agoContinued:
Roland Häder [Thu, 22 Jun 2023 04:52:35 +0000 (06:52 +0200)]
Continued:
- don't check blacklist for (maybe) obsfucated domains,
  domain.is_domain_wanted() does this

16 months agoContinued:
Roland Häder [Thu, 22 Jun 2023 04:43:30 +0000 (06:43 +0200)]
Continued:
- global parameter --debug added, produces with large blocks.db file a lot of
  output! You have been warned!

16 months agoContinued:
Roland Häder [Thu, 22 Jun 2023 04:15:11 +0000 (06:15 +0200)]
Continued:
- rewrote more f-masked logger messages to lazy '%'
- blacklisted grossard.fr: please don't send tons of garbage!
- instances.deobsfucate() should not validate domains as this is always invalid

16 months agoContinued:
Roland Häder [Thu, 22 Jun 2023 00:34:08 +0000 (02:34 +0200)]
Continued:
- rewrote more logger lines from f-masked to lazy '%'

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 23:56:42 +0000 (01:56 +0200)]
Continued:
- added check if parameter 'char' is found in parameter 'domain'

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 23:03:25 +0000 (01:03 +0200)]
Continued:
- introduced helper module for domains, need to be aliased to 'domain_helper'
  to avoid conflict with parameter 'domain'

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 22:01:52 +0000 (00:01 +0200)]
Continued:
- rewrote more f-masked logger messages to lazy '%'
- also made them more common (see EXIT!, ABORT!)

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 20:55:38 +0000 (22:55 +0200)]
Continued:
- disabled lint-check no-else-raise
- rewrote more f-masked logger lines to lazy '%'

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 17:56:35 +0000 (19:56 +0200)]
Continued:
- also rewrote these logger messages to lazy '%' way
- fixed some unused-variable/import (pylint)
- fixed some syntax errors

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 17:44:35 +0000 (19:44 +0200)]
Continued:
- directly imported format_datetime to keep loading time short
- fixed syntax errors

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 17:39:28 +0000 (19:39 +0200)]
Continued:
- renamed fba.fba to fba.utils
- moved database-relevant code to fba.database module

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 16:43:59 +0000 (18:43 +0200)]
Continued:
- added command fetch_todon_wiki() that will update blocks from todon.eu
- more checks for bad/unwanted domains added (.arpa/.tld)
- more f-masked strings rewritten to lazy '%' way

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 13:45:46 +0000 (15:45 +0200)]
Continued:
- fixed some logger messages to lazy format

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 13:36:10 +0000 (15:36 +0200)]
Continued:
- added command fetch_fedipact() where some instances might be gathered (who
  are happy to block)
- a warning was to noisy for missing keys

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 13:02:23 +0000 (15:02 +0200)]
Continued:
- some lemmy APIs return NULL (NoneType) in 'federated_instances' field
- fixed some logging messages

16 months agoFixed:
Roland Häder [Wed, 21 Jun 2023 06:44:01 +0000 (08:44 +0200)]
Fixed:
- batch of logging-fstring-interpolation

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 06:09:23 +0000 (08:09 +0200)]
Continued:
- introduced real logger, all commented-out debug lines are now active

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 05:45:50 +0000 (07:45 +0200)]
Continued:
- variable 'peer' can be a dict with "domain" as a key where the domain name
  is stored

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 04:17:39 +0000 (06:17 +0200)]
Continued:
- skip bad domains here, too
- this avoids more exceptions

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 03:41:20 +0000 (05:41 +0200)]
Continued:
- also skip here to avoid exception

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 03:37:16 +0000 (05:37 +0200)]
Continued:
- first check validity and if not wanted TLDs like '.arpa' or '.tld'
- then check blacklist

16 months agoConntinued:
Roland Häder [Wed, 21 Jun 2023 03:24:08 +0000 (05:24 +0200)]
Conntinued:
- added more checks on domain names

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 02:39:21 +0000 (04:39 +0200)]
Continued:
- ops, fixed variable chaos

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 02:21:45 +0000 (04:21 +0200)]
Continued:
- moved fba.federation|network to package fba.http

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 02:05:52 +0000 (04:05 +0200)]
Continued:
- also moved fba.config to package fba.helpers

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 01:54:37 +0000 (03:54 +0200)]
Continued:
- removed duplicate functions
- fixed __all__
- removed whitespace
- re-added set_detection_mode()

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 01:52:49 +0000 (03:52 +0200)]
Continued:
- move fba.blacklist to fba.helpers package

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 01:16:26 +0000 (03:16 +0200)]
Continued:
- also tidyup blocked domain from Friendica, too
- also check it against blacklist and any unwanted .arpa/.tld TLDs

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 01:12:21 +0000 (03:12 +0200)]
Continued:
- checks against blacklist added

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 01:06:56 +0000 (03:06 +0200)]
Continued:
- tidyup blocked domain
- set last error on exception
- don't lower header text

16 months agoContinued:
Roland Häder [Wed, 21 Jun 2023 00:28:35 +0000 (02:28 +0200)]
Continued:
- implemented lemmy.fetch_blocks()
- don't fetch generically, better only network.exceptions

16 months agoContinued:
Roland Häder [Tue, 20 Jun 2023 21:11:56 +0000 (23:11 +0200)]
Continued:
- also check for '<html', if not found then skip this broken HTML

16 months agoContinued:
Roland Häder [Tue, 20 Jun 2023 19:59:46 +0000 (21:59 +0200)]
Continued:
- okay /api/top.json while the view is called /scoreboard, renamed it

16 months agoContinued:
Roland Häder [Tue, 20 Jun 2023 19:04:54 +0000 (21:04 +0200)]
Continued:
- another aliases for pleroma/misskey

16 months agoContinued:
Roland Häder [Tue, 20 Jun 2023 18:34:58 +0000 (20:34 +0200)]
Continued:
- imported needed module fba.helpers.cookies
- some nodeinfo may return blacklisted or invalid domains, let's skip them here

16 months agoContinued:
Roland Häder [Tue, 20 Jun 2023 13:37:10 +0000 (15:37 +0200)]
Continued:
- added argument --software to command fetch_blocks
- added some missing checks on parameter 'domain'
- removed unused imports

16 months agoContinued:
Roland Häder [Tue, 20 Jun 2023 13:06:26 +0000 (15:06 +0200)]
Continued:
- introduced cookies.clear() to clear cookies for given domain

16 months agoFixed:
Roland Häder [Tue, 20 Jun 2023 12:58:26 +0000 (14:58 +0200)]
Fixed:
- `if not "foo" in bar` is wrong, use `if "foo" not in bar` instead

16 months agoContinued:
Roland Häder [Tue, 20 Jun 2023 12:56:07 +0000 (14:56 +0200)]
Continued:
- introduced cookies.has()
- only invoke cookies.get_all() when there are cookies stored

16 months agoContinued:
Roland Häder [Tue, 20 Jun 2023 12:40:08 +0000 (14:40 +0200)]
Continued:
- added new helper for cookies

16 months agoContinued:
Roland Häder [Tue, 20 Jun 2023 12:16:30 +0000 (14:16 +0200)]
Continued:
- only check for domain part, some instances may have been installed in a sub
  path

16 months agoContinued:
Roland Häder [Tue, 20 Jun 2023 12:14:11 +0000 (14:14 +0200)]
Continued:
- tpzo fixed

16 months agoContinued:
Roland Häder [Tue, 20 Jun 2023 11:52:59 +0000 (13:52 +0200)]
Continued:
- stopping other bad domains from entering functions
- also need to catch urlib3 exception

16 months agoContinued:
Roland Häder [Tue, 20 Jun 2023 05:27:48 +0000 (07:27 +0200)]
Continued:
- avoided local variables

16 months agoContinued:
Roland Häder [Tue, 20 Jun 2023 04:31:29 +0000 (06:31 +0200)]
Continued:
- new URL for TOP 10 lists

16 months agoContinued:
Roland Häder [Tue, 20 Jun 2023 03:06:52 +0000 (05:06 +0200)]
Continued:
- better acquire lock here

16 months agoContinued:
Roland Häder [Tue, 20 Jun 2023 02:49:56 +0000 (04:49 +0200)]
Continued:
- ignore non-updating UPDATE statements

16 months agoContinued:
Roland Häder [Tue, 20 Jun 2023 02:43:30 +0000 (04:43 +0200)]
Continued:
- new flooder everyoneattack.com added
- also ignored empty nodeinfo_url column
- WIP: commented out missing lemmy.fetch_blocks()
- also fixed some missing variables (removed from string)

16 months agoContinued:
Roland Häder [Tue, 20 Jun 2023 01:20:17 +0000 (03:20 +0200)]
Continued:
- added command fetch_observer() to fetch instances from fediverse.observer
- WIP: added blocks for lemmy

16 months agoContinued:
Roland Häder [Mon, 19 Jun 2023 19:41:46 +0000 (21:41 +0200)]
Continued:
- wrapped into single quotes

16 months agoContinued:
Roland Häder [Mon, 19 Jun 2023 12:22:21 +0000 (14:22 +0200)]
Continued:
- further exception added

16 months agoContinued:
Roland Häder [Sun, 18 Jun 2023 18:43:27 +0000 (20:43 +0200)]
Continued:
- bookwym and takahe are not supported, let's remove them
- don't cut off path when checking if instances is registered or not
- added commented out debug line

16 months agoContinued:
Roland Häder [Sun, 18 Jun 2023 16:54:39 +0000 (18:54 +0200)]
Continued:
- skip fake domains (.tld)
- don't invoke instances.add() with fake domains (.tld)

16 months agoContinued:
Roland Häder [Sun, 18 Jun 2023 16:39:45 +0000 (18:39 +0200)]
Continued:
- returned JSON can sometimes be no list

16 months agoContinued:
Roland Häder [Sun, 18 Jun 2023 12:10:40 +0000 (14:10 +0200)]
Continued:
- sorted network type (aka. "software") members

17 months agoContinued:
Roland Häder [Sun, 18 Jun 2023 09:55:42 +0000 (11:55 +0200)]
Continued:
- some link[href] results from nodeinfo may not have complete URLs
- strange, but true. they need to be prepended with https://{domain}

17 months agoContinue:
Roland Häder [Sun, 18 Jun 2023 01:35:46 +0000 (03:35 +0200)]
Continue:
- continue checking on software type after it was discovered by
  generator/site_name
- maybe it needs aliasing?
- also add 'slipfox calckey' as an alias for 'misskey'
- don't tidy-up None values

17 months agoContinued:
Roland Häder [Sun, 18 Jun 2023 01:01:08 +0000 (03:01 +0200)]
Continued:
- don't invoke update_data() which caused a non-existing instance being updated

17 months agoWIP:
Roland Häder [Sun, 18 Jun 2023 00:53:52 +0000 (02:53 +0200)]
WIP:
- removed geneic-try/except blocks around SQL statements, let them fail and not
  sys.exit() uncleanly
- raise an exception if no row has been updated, e.g. when record isn't found

17 months agoContinued:
Roland Häder [Sat, 17 Jun 2023 09:58:41 +0000 (11:58 +0200)]
Continued:
- ignore "accept" block level as that is whitelisting instances, not blocking them

17 months agoContinued:
Roland Häder [Sat, 17 Jun 2023 09:47:19 +0000 (11:47 +0200)]
Continued:
- in the end, a missing "t" caused a lot of 'sofware' to be None (NULL) now

17 months agoContinued:
Roland Häder [Sat, 17 Jun 2023 08:45:45 +0000 (10:45 +0200)]
Continued:
- need to handle requests.exceptions.InvalidSchema as well
- if variable link is not dict or does not contain 'rel' attribute for what
  reason, then skip this

17 months agoContinued:
Roland Häder [Fri, 16 Jun 2023 13:24:59 +0000 (15:24 +0200)]
Continued:
- let's always update last error details/status code

17 months agoContinued:
Roland Häder [Thu, 15 Jun 2023 23:45:16 +0000 (01:45 +0200)]
Continued:
- rewrote block for fetching nodeinfo, fetch is provided path is None or matches
  with request or http[s]://domain/path
- if a protocol is given in 'path' parameter, then it needs to be removed

17 months agoContinued:
Roland Häder [Thu, 15 Jun 2023 22:29:01 +0000 (00:29 +0200)]
Continued:
- if software is (still) None, then it needs to be determined, not otherwise
  (logic error)
- commented out some DEBUG lines

17 months agoContinued:
Roland Häder [Tue, 13 Jun 2023 23:43:23 +0000 (01:43 +0200)]
Continued:
- added config key "rss_limit" (default: 50)

17 months agoContinued:
Roland Häder [Tue, 13 Jun 2023 22:43:29 +0000 (00:43 +0200)]
Continued:
- reformatted ({}) block
- commented out debug line
- converted print("", foo, bar) to masked (f) version
- fixed logic bug when not all needed steps were executed

17 months agoContinued:
Roland Häder [Tue, 13 Jun 2023 21:05:52 +0000 (23:05 +0200)]
Continued:
- always add non-existing instances, also when their software type is not
  detectable, e.g. not existing
- also skip recently checked instances

17 months agoContinued:
Roland Häder [Tue, 13 Jun 2023 20:16:46 +0000 (22:16 +0200)]
Continued:
- re-introduced wrapper function around each column of the "model" `instances`
- marked set_data() as private (now named _set_data())
- these wrappers do NOT invoke instances.update_data(), you have to do this
  from your code

17 months agoContinued:
Roland Häder [Tue, 13 Jun 2023 17:58:52 +0000 (19:58 +0200)]
Continued:
- first load main packages, then sub

17 months agoFixed:
Roland Häder [Tue, 13 Jun 2023 17:20:22 +0000 (19:20 +0200)]
Fixed:
- also the other way around

17 months agoContinued:
Roland Häder [Tue, 13 Jun 2023 16:26:43 +0000 (18:26 +0200)]
Continued:
- 'data' is optional, e.g. empty POST bodies are okay
- fixed handling of JSON replies from peertube instances:
- the request /api/v1/server/followers is correct, then always the JSON has
  "follow" and "following" as elements

17 months agoFixed:
Roland Häder [Tue, 13 Jun 2023 10:08:11 +0000 (12:08 +0200)]
Fixed:
- some instances have broken API at /api/v1/instance/domain_blocks which returns
  nodeinfo (see masto1.iana.de)

17 months agoContinued:
Roland Häder [Tue, 13 Jun 2023 09:32:02 +0000 (11:32 +0200)]
Continued:
- domain/path might be a valid installation path, but some bug in Friendica
  caused my instance to be reported as 'f.haeder.net/featured' which sucks
- still we need to let domain/path pass here as some installations might
  be happening to be installed in such a way
- sure, best option is always a sub-domain ...

17 months agoContinued:
Roland Häder [Tue, 13 Jun 2023 09:19:23 +0000 (11:19 +0200)]
Continued:
- added 'software' as optional parameter to instances.add()
- also prevent bad invocations when a link to a user profile has provided

17 months agoContinued:
Roland Häder [Tue, 13 Jun 2023 02:18:29 +0000 (04:18 +0200)]
Continued:
- removed some wrapper functions
- update instance data even when the connection didn't work or some error
  status code (>= 400) came

17 months agoFixed:
Roland Häder [Mon, 12 Jun 2023 23:43:11 +0000 (01:43 +0200)]
Fixed:
- ops, wrong way!

17 months agoContinued:
Roland Häder [Mon, 12 Jun 2023 23:25:57 +0000 (01:25 +0200)]
Continued:
- moved fba.locking to fba.helpers

17 months agoContinued:
Roland Häder [Mon, 12 Jun 2023 22:01:25 +0000 (00:01 +0200)]
Continued:
- moved blocks, instances to new package fba.models as these modules are only
  around a database table with the same name
- movved+renamed fba.log_error() to fba.models.error_log.add()
- pleroma has a /instance/about/index.html "API" which can be parsed for
  block lists if the JSON has returned no 'mrf_simple' and
  'quarantined_instances'

17 months agoContinued:
Roland Häder [Mon, 12 Jun 2023 19:14:44 +0000 (21:14 +0200)]
Continued:
- prevent .arpa domains being added by instances.add()

17 months agoContinued:
Roland Häder [Mon, 12 Jun 2023 18:09:38 +0000 (20:09 +0200)]
Continued:
- better query `last_error_details` as this column is always set to NULL on
  success

17 months agoContinued:
Roland Häder [Mon, 12 Jun 2023 17:59:22 +0000 (19:59 +0200)]
Continued:
- ops, don't double-fetch a single row, causing 2nd invocation of fetchone()
  to return None as the first one already fetched it