]> git.mxchange.org Git - fba.git/log
fba.git
12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 18:52:18 +0000 (20:52 +0200)]
Continued:
- explained error code 999
- added missing header for this scoreboard

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 18:35:52 +0000 (20:35 +0200)]
Continued:
- moved fba.fetch_misskey_blocks() to misskey.fetch_blocks()
- avoided calling tidyup_reason() on NoneType

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 18:24:46 +0000 (20:24 +0200)]
Continued:
- gotosocial has no open API for instance blocks

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 18:23:01 +0000 (20:23 +0200)]
Continued:
- ops, oversaw this one

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 18:03:43 +0000 (20:03 +0200)]
Continued:
- some block reasons have a long domain list (which can be taken as
  instance names, too) with no space after a comma
- this causes the web page to be very(!) wide
- added missing "import inspect"
- improved some debug messages

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 17:39:35 +0000 (19:39 +0200)]
Continued:
- added "TOP 30" of error codes (excluding 200)

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 17:07:03 +0000 (19:07 +0200)]
Continued:
- make table border visible

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 16:50:52 +0000 (18:50 +0200)]
Continued:
- also tidyup reason after fetching from instance
- moved validating domain to upper if/elif blocks
- re-color website to more friendlier colors
- rewrote some debug lines

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 14:54:09 +0000 (16:54 +0200)]
Continued:
- "get" should be used only for getters
- removed variable "get_peers_url" which was used only once in code

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 14:43:04 +0000 (16:43 +0200)]
Continued:
- moved templates to templates/views/
- introduced base.html which should be extended by view templates
- TOP x lists now have an own view template

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 06:01:00 +0000 (08:01 +0200)]
Continued:
- moved more instances-related functions to module fba.instances
- also cut of /profile/ and /users/ from paths

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 05:38:33 +0000 (07:38 +0200)]
Continued:
- moved and renamed fba.add_instance() to instances.add()

12 months agoContinued:
Roland Häder [Wed, 7 Jun 2023 17:08:09 +0000 (19:08 +0200)]
Continued:
- moved gotosocial part to fba/federation/gotosocial.py
- fixed duplicate variable names

12 months agoContinued:
Roland Häder [Wed, 7 Jun 2023 12:19:14 +0000 (14:19 +0200)]
Continued:
- find_domains() is in module 'fba'

12 months agoContinued:
Roland Häder [Wed, 7 Jun 2023 01:27:18 +0000 (03:27 +0200)]
Continued:
- needed to rename blocks -> blocklist to avoid mixing with fba.blocks

12 months agoContinued:
Roland Häder [Wed, 7 Jun 2023 00:54:15 +0000 (02:54 +0200)]
Continued:
- parameter 'software' is no longer available

12 months agoContinued:
Roland Häder [Tue, 6 Jun 2023 22:26:21 +0000 (00:26 +0200)]
Continued:
- commented out debug lines
- added commented-out lines, too ;-)
- tidyup software name

12 months agoContinued:
Roland Häder [Tue, 6 Jun 2023 22:21:02 +0000 (00:21 +0200)]
Continued:
- don't link to invalid domain names, if invalid a HTTPException is raised

12 months agoContinued:
Roland Häder [Tue, 6 Jun 2023 21:28:40 +0000 (23:28 +0200)]
Continued:
- ops, I have not removed this one

12 months agoContinued:
Roland Häder [Tue, 6 Jun 2023 20:11:46 +0000 (22:11 +0200)]
Continued:
- renamed package 'network' -> 'federation'

12 months agoContinued:
Roland Häder [Tue, 6 Jun 2023 20:07:09 +0000 (22:07 +0200)]
Continued:
- moved blacklist-related stuff to fba/blacklist.py
- and now, the word 'blacklist' is not racism, words are innocent!

12 months agoContinued:
Roland Häder [Tue, 6 Jun 2023 19:55:39 +0000 (21:55 +0200)]
Continued:
- moved functions for table 'blocks' to own module
- renamed some of them
- fixed missing reference to fba.api_headers

12 months agoWIP:
Roland Häder [Tue, 6 Jun 2023 18:43:41 +0000 (20:43 +0200)]
WIP:
- moved network-specific function to their own fba/network/<network>.py module
- renamed blocker -> domain in network-specific functions (it is 'domain' in
  the end)

12 months agoContinued:
Roland Häder [Tue, 6 Jun 2023 10:53:36 +0000 (12:53 +0200)]
Continued:
- maybe this floods your output a little ...
- but still I need to find missing translations

12 months agoContinued:
Roland Häder [Tue, 6 Jun 2023 10:48:08 +0000 (12:48 +0200)]
Continued:
- don't use tidyup_domain() on header text
- also need to check /about/more - they often "hide" there the block list

12 months agoContinued:
Roland Häder [Tue, 6 Jun 2023 10:33:47 +0000 (12:33 +0200)]
Continued:
- moved timestamp formatting to configuration file
- added navigation back to /

12 months agoContinued:
Roland Häder [Tue, 6 Jun 2023 10:16:56 +0000 (12:16 +0200)]
Continued:
- renamed result <-> blocks
- added config entry 'hostname' which you should change to where you have
  installed it, e.g. mine is 'fba.mxchange.org' (password-protected)

12 months agoContinued:
Roland Häder [Tue, 6 Jun 2023 09:44:56 +0000 (11:44 +0200)]
Continued:
- added more for <title> so search engines have more pages to index and not
  combine them into one result only
- still we need paging support here

12 months agoContinued:
Roland Häder [Tue, 6 Jun 2023 09:35:11 +0000 (11:35 +0200)]
Continued:
- `inspect.currentframe().f_code.co_name` is one LARGE way for finding out
  current function's name but it does not involve any private functions
  being called publicly
- still PHP has __FUNCTION__ for this purpose ...

12 months agoContinued:
Roland Häder [Tue, 6 Jun 2023 08:43:08 +0000 (10:43 +0200)]
Continued:
- sys.argv[0] is now always ./fba.py, so let's take the function's name
  instead

12 months agoContinued:
Roland Häder [Tue, 6 Jun 2023 07:19:16 +0000 (09:19 +0200)]
Continued:
- renamed has_element() to has_key()
- fixed bad handling of has_key()
- also need to count added names and exit loop on zero

12 months agoContinued:
Roland Häder [Mon, 5 Jun 2023 23:58:09 +0000 (01:58 +0200)]
Continued:
- only module 'boot' is needed here

12 months agoContinued:
Roland Häder [Mon, 5 Jun 2023 23:18:13 +0000 (01:18 +0200)]
Continued:
- introduced get_url() which uses urllib.parse() to wrap invocation around
  get_response() nicely
- so all reqto.get|post() invocations are now centralized for later easy
  expansion with SOCKS proxy support

12 months agoContinued:
Roland Häder [Mon, 5 Jun 2023 21:41:07 +0000 (23:41 +0200)]
Continued:
- add argument --single to commands.fetch_instances() which only fetches given
  instance
- int() doesn't "magically" turn NoneType to 0, PHP would do it, so let's handle
  this here by ourself

12 months agoContinued:
Roland Häder [Mon, 5 Jun 2023 21:32:04 +0000 (23:32 +0200)]
Continued:
- exit with returned status code

12 months agoContinued:
Roland Häder [Mon, 5 Jun 2023 21:22:29 +0000 (23:22 +0200)]
Continued:
- prog is the script's name by default which is okay
- added epilog

12 months agoFixed:
Roland Häder [Mon, 5 Jun 2023 21:16:44 +0000 (23:16 +0200)]
Fixed:
- --domain is required for command 'fetch_instances'

12 months agoContinued:
Roland Häder [Mon, 5 Jun 2023 21:11:29 +0000 (23:11 +0200)]
Continued:
- renamed command.py -> commands.py

12 months agoContinued:
Roland Häder [Mon, 5 Jun 2023 20:09:42 +0000 (22:09 +0200)]
Continued:
- introduced argparse which is a more flexible way of handling command-line
  arguments
- moved all commands to fba/command.py you can now access them through
  $ ./fba.py <command>
- please use --help to see which commands are all supported, you can also use
  it on a single command to get all supported arguments

12 months agoContinued:
Roland Häder [Mon, 5 Jun 2023 09:53:16 +0000 (11:53 +0200)]
Continued:
- moved acquiring lock to a place when a domain is supposed to be
  added
- added missing fba.tidyup_reason()

12 months agoContinued:
Roland Häder [Mon, 5 Jun 2023 08:30:38 +0000 (10:30 +0200)]
Continued:
- origin=NULL was shown as "None", so let's exclude this

12 months agoContinued:
Roland Häder [Mon, 5 Jun 2023 07:31:18 +0000 (09:31 +0200)]
Continued:
- some APIs return the same result at the end all over again
- so we need to check if the domain is already part of the created list
- for that purpose has_element() is introduced

12 months agoContinued:
Roland Häder [Sun, 4 Jun 2023 21:32:58 +0000 (23:32 +0200)]
Continued:
- renamed 'res' to 'response'
- catch exception, log error and raise it again

12 months agoContinued:
Roland Häder [Sun, 4 Jun 2023 21:17:38 +0000 (23:17 +0200)]
Continued:
- introduced fba.get_response()

12 months agoContinued:
Roland Häder [Sun, 4 Jun 2023 19:08:32 +0000 (21:08 +0200)]
Continued:
- invocation, not calling ;-)

12 months agoContinued:
Roland Häder [Sun, 4 Jun 2023 14:06:37 +0000 (16:06 +0200)]
Continued:
- retrieving nodeinfo shouldn't take that long

12 months agoContinued:
Roland Häder [Sun, 4 Jun 2023 13:37:05 +0000 (15:37 +0200)]
Continued:
- package/module of JSONDecodeError is json.decoder.JSONDecodeError

12 months agoContinued:
Roland Häder [Sun, 4 Jun 2023 12:54:47 +0000 (14:54 +0200)]
Continued:
- introduced json_from_response() which handles decoding errors, e.g. when
  a server has returned a HTML instead of a JSON which is caused by improper
  error handling

12 months agoContinued:
Roland Häder [Sun, 4 Jun 2023 11:32:55 +0000 (13:32 +0200)]
Continued:
- trim off last dot in host/domain name
- only release lock when acquired, e.g. check_instance.py doesn't need a lock

12 months agoContinued:
Roland Häder [Sun, 4 Jun 2023 11:06:23 +0000 (13:06 +0200)]
Continued:
- renamed functions in 'cache' module as they are already in proper module
- tried to prevent error if an empty (0 Byte) result is returned

12 months agoContinued:
Roland Häder [Sun, 4 Jun 2023 09:47:07 +0000 (11:47 +0200)]
Continued:
- the value from "misskey_offset" went into "limit" parameter, so let's rename
  it to "misskey_limit"
- also misskey may return same set of results, so this need to be counted and
  then the while loop aborted
- also TIME() did NOT store timestamp, we need to use time.time() again ...

12 months agoContinued:
Roland Häder [Sun, 4 Jun 2023 09:07:05 +0000 (11:07 +0200)]
Continued:
- it is without slashes

12 months agoContinued:
Roland Häder [Sun, 4 Jun 2023 04:47:28 +0000 (06:47 +0200)]
Continued:
- there are no private variables or methods, all is public
- there is however a notation, that a leading _ indicates private access and
  that you should search for getters/setters
- so when you see some code like `module._foo()` then notify them about this

12 months agoContinued:
Roland Häder [Sun, 4 Jun 2023 04:42:46 +0000 (06:42 +0200)]
Continued:
- let the config value be accessed over config.get()

12 months agoContinued:
Roland Häder [Sun, 4 Jun 2023 04:32:58 +0000 (06:32 +0200)]
Continued:
- move config-related stuff to new module 'config'

12 months agoContinued:
Roland Häder [Sun, 4 Jun 2023 03:07:20 +0000 (05:07 +0200)]
Continued:
- committing every single INSERT INTO will cause a lot of I/O load, let's
  combine them all into a single transaction

12 months agoContinued:
Roland Häder [Sun, 4 Jun 2023 00:56:56 +0000 (02:56 +0200)]
Continued:
- ops, forgot to add it here

12 months agoContinued:
Roland Häder [Sat, 3 Jun 2023 23:08:13 +0000 (01:08 +0200)]
Continued:
- ops, also they need 'fba.' now

12 months agoContinued:
Roland Häder [Sat, 3 Jun 2023 23:03:30 +0000 (01:03 +0200)]
Continued:
- exposed originator (Python script) Top "10"

12 months agoContinued:
Roland Häder [Sat, 3 Jun 2023 22:35:37 +0000 (00:35 +0200)]
Continued:
- moved instance-related functions and module-wide variables to 'instances.py'

12 months agoContinued:
Roland Häder [Sat, 3 Jun 2023 19:54:12 +0000 (21:54 +0200)]
Continued:
- renamed tidyup() to tidyup_domains()
- so tidyup_reason() can come (WIP)

12 months agoContinued:
Roland Häder [Sat, 3 Jun 2023 17:20:12 +0000 (19:20 +0200)]
Continued:
- added script to fetch blocked instances by chaos.social
- introduced is_instance_blocked()

12 months agoContinued:
Roland Häder [Sat, 3 Jun 2023 16:31:21 +0000 (18:31 +0200)]
Continued:
- sorted import members
- added missing 'import sys'

12 months agoContinued:
Roland Häder [Sat, 3 Jun 2023 14:53:14 +0000 (16:53 +0200)]
Continued:
- invoking update_instance_data() but having no pending instance data doesn't
  make any sense

12 months agoContinued:
Roland Häder [Sat, 3 Jun 2023 13:31:18 +0000 (15:31 +0200)]
Continued:
- added script to check if instance aka. "domain" is valid, not blacklisted
  and not already registered
- in any of these conditions, an other status code is returned

12 months agoContinued:
Roland Häder [Sat, 3 Jun 2023 12:37:51 +0000 (14:37 +0200)]
Continued:
- fixed cache module

12 months agoContinued:
Roland Häder [Sat, 3 Jun 2023 07:02:04 +0000 (09:02 +0200)]
Continued:
- 3rd parameter is not 'origin', it is 'script'

12 months agoContinued:
Roland Häder [Sat, 3 Jun 2023 06:40:56 +0000 (08:40 +0200)]
Continued:
- check dictionary keys before using them, prevents KeyError being raised

12 months agoContinued:
Roland Häder [Sat, 3 Jun 2023 06:37:09 +0000 (08:37 +0200)]
Continued:
- renamed lock_process() to acquire_lock()

12 months agoContinued:
Roland Häder [Sat, 3 Jun 2023 06:15:19 +0000 (08:15 +0200)]
Continued:
- moved 'fba' to own folder
- splitted up file a bit: boot, cache

12 months agoContinued:
Roland Häder [Sat, 3 Jun 2023 05:50:29 +0000 (07:50 +0200)]
Continued:
- inter-process locking added, prevents nasty stuff

12 months agoContinued:
Roland Häder [Fri, 2 Jun 2023 22:36:43 +0000 (00:36 +0200)]
Continued:
- log every single problem

12 months agoContinued:
Roland Häder [Fri, 2 Jun 2023 21:02:38 +0000 (23:02 +0200)]
Continued:
- Firfox version updated
- also check if domain is already registered to avoid lots of requests

12 months agoContinued:
Roland Häder [Fri, 2 Jun 2023 21:01:20 +0000 (23:01 +0200)]
Continued:
- added Python script to fetch domains from bka.la (thank you to Kromonos)

12 months agoContinued:
Roland Häder [Fri, 2 Jun 2023 18:22:41 +0000 (20:22 +0200)]
Continued:
- added wrapper script to fetch RSS feeds from FBA installations (e.g.
  https://fba.ryona.agency/rss )

12 months agoContinued:
Roland Häder [Fri, 2 Jun 2023 17:57:12 +0000 (19:57 +0200)]
Continued:
- moved fetch_instances() to fba

12 months agoContinued:
Roland Häder [Fri, 2 Jun 2023 17:51:58 +0000 (19:51 +0200)]
Continued:
- also rewrote this

12 months agoContinued:
Roland Häder [Fri, 2 Jun 2023 14:31:44 +0000 (16:31 +0200)]
Continued:
- more debug lines added
- also fixed maybe bad function calls
- debug messages improved

12 months agoContinued:
Roland Häder [Fri, 2 Jun 2023 14:04:42 +0000 (16:04 +0200)]
Continued:
- better warn about not deobsfucated domain names

12 months agoContinued:
Roland Häder [Fri, 2 Jun 2023 13:44:15 +0000 (15:44 +0200)]
Continued:
- first thanks to `activitypub-trolls.cf` we have tons of registered
  "instances" which needs to be fetched and then these trolls need to be
  ignored
- then commented out some debug lines
- also fixed some code
- also let */? pass as obsfucations

12 months agoContinued:
Roland Häder [Fri, 2 Jun 2023 12:48:23 +0000 (14:48 +0200)]
Continued:
- timestamps are not handled over anymore
- more checks on parameter

12 months agoContinued:
Roland Häder [Fri, 2 Jun 2023 11:45:14 +0000 (13:45 +0200)]
Continued:
- don't unset last_status_code/last_error_details on any update of instance  data

12 months agoContinued:
Roland Häder [Fri, 2 Jun 2023 11:31:57 +0000 (13:31 +0200)]
Continued:
- encapsulated setting instance data in set_instance_data()
- also introduced is_primitive()

12 months agoContinued:
Roland Häder [Fri, 2 Jun 2023 10:06:42 +0000 (12:06 +0200)]
Continued:
- renamed more variable/function
- only log count, not whole array
- some parameters cannot be an empty, too

12 months agoContinued:
Roland Häder [Fri, 2 Jun 2023 09:55:26 +0000 (11:55 +0200)]
Continued:
- renamed update_nodeinfos() to update_instance_data()
- also only delete pending instance data if UPDATE statement has updated
  something (at least the timestamps SHOULD cause a row update)

12 months agoContinued:
Roland Häder [Fri, 2 Jun 2023 09:52:14 +0000 (11:52 +0200)]
Continued:
- need to check 'peer' if type 'None'
- 48 hours is enough for checking for new instances, so fast no new instance
  will be created
- updating 'last_updated' now moved to update_nodeinfos()

12 months agoContinued:
Roland Häder [Thu, 1 Jun 2023 20:14:27 +0000 (22:14 +0200)]
Continued:
- moved all updates of columns in 'instances' table to central function
  update_nodeinfos(), other functions are just wrappers to fill proper array
  elements
- also save total found row count

12 months agoContinued:
Roland Häder [Tue, 30 May 2023 05:54:22 +0000 (07:54 +0200)]
Continued:
- cache access can be very noisy, others maybe not so much
- also check for og:site_name to "guess" the software type, old Mastodon (2.x.x)
  versions don't provide nodeinfo data
- remove " hosted on " and following (typical for og:site_name from Mastodon)

12 months agoContinued:
Roland Häder [Tue, 30 May 2023 03:14:10 +0000 (05:14 +0200)]
Continued:
- only list entries where the software has been detected
- still this will list non-fediverse "instances" such as normal websites

12 months agoContinued:
Roland Häder [Tue, 30 May 2023 01:26:24 +0000 (03:26 +0200)]
Continued:
- also fetch origin and nodeinfo_url here
- also add instance if not found
- improved some log messages

12 months agoContinued:
Roland Häder [Tue, 30 May 2023 01:19:40 +0000 (03:19 +0200)]
Continued:
- fixed indenting
- also include type (exception name) in log message

12 months agoContinued:
Roland Häder [Mon, 29 May 2023 20:32:24 +0000 (22:32 +0200)]
Continued:
- no need for updating last_instance_fetc/last_nodeinfo here

12 months agoContinued:
Roland Häder [Mon, 29 May 2023 19:33:45 +0000 (21:33 +0200)]
Continued:
- made executable
- added interpreter line and encoding

12 months agoContinued:
Roland Häder [Mon, 29 May 2023 19:05:16 +0000 (21:05 +0200)]
Continued:
- added .json to all JSON responses
- added response class JSONResponse (I hope it is not overstated this way?
- cleaned up imports a bit (only used once can be referenced directly)

12 months agoContinued:
Roland Häder [Mon, 29 May 2023 18:58:44 +0000 (20:58 +0200)]
Continued:
- splitted "scoreboard.html" out of index.html
- added route + template for "robots.txt request
- renamed "app" to "router"

12 months agoContinued:
Roland Häder [Mon, 29 May 2023 18:40:12 +0000 (20:40 +0200)]
Continued:
- move templates to own folder

12 months agoContinued:
Roland Häder [Mon, 29 May 2023 18:08:22 +0000 (20:08 +0200)]
Continued:
- introduced error_log table and corresponding log_error() function
- added error_log_cleanup for cleaning up old records (default: 7 days)

12 months agoContinued:
Roland Häder [Mon, 29 May 2023 17:34:31 +0000 (19:34 +0200)]
Continued:
- no bold here, I prefer that for head lines

12 months agoContinued:
Roland Häder [Mon, 29 May 2023 17:13:00 +0000 (19:13 +0200)]
Continued:
- introduced config key 'host', so you can let this run on an other IP address
- recommended is 127.0.0.1, of course and then setup a reverse-proxy (in
  Apache's terminology)
- cleaned up imports

12 months agoContinued:
Roland Häder [Mon, 29 May 2023 16:31:34 +0000 (18:31 +0200)]
Continued:
- removed superflous 'get_peers_url' from database, it was only logged and
  get_peers() cannot make use of it as it depends on detected software