]> git.mxchange.org Git - fba.git/log
fba.git
17 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

17 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 ...

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

17 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

17 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()

17 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'

17 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

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

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

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

17 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'

17 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)

17 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()

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

17 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

17 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

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

17 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'

17 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

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

17 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

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

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

17 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

17 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)

17 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 )

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

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

17 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

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

17 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

17 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

17 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

17 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()

17 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

17 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)

17 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()

17 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

17 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)

17 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

17 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

17 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

17 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

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

17 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)

17 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"

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

17 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)

17 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

17 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

17 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

17 months agoContinued:
Roland Häder [Mon, 29 May 2023 16:25:43 +0000 (18:25 +0200)]
Continued:
- introduced has_pending_nodeinfos()
- also log exception name (aka. type)

17 months agoContinued:
Roland Häder [Mon, 29 May 2023 06:29:10 +0000 (08:29 +0200)]
Continued:
- is_instance_registered() caused tons of SQL queries, let's introduce some
  cache here
- 1 hour for recheck is good for development (even shorter) but a bad idea in
  the wild

17 months agoContinued:
Roland Häder [Mon, 29 May 2023 00:48:40 +0000 (02:48 +0200)]
Continued:
- add_peers() now returns a list of peers, dict doesn't make sense here
- also handled error messages from JSON API POST requests

17 months agoContinued:
Roland Häder [Sun, 28 May 2023 23:55:24 +0000 (01:55 +0200)]
Continued:
- also fetch nodeinfo_url from database and handle it over so no redundant
  static checks will happen

17 months agoLet's do this proper. Here you go, FSF!
Roland Häder [Sun, 28 May 2023 16:16:00 +0000 (18:16 +0200)]
Let's do this proper. Here you go, FSF!

17 months agoContinued:
Roland Häder [Sun, 28 May 2023 16:02:05 +0000 (18:02 +0200)]
Continued:
- added last_instance_fetch timestamp

17 months agoContinued:
Roland Häder [Sun, 28 May 2023 15:52:55 +0000 (17:52 +0200)]
Continued:
- maybe str(e) helps here and there?

17 months agoContinued:
Roland Häder [Sun, 28 May 2023 14:34:57 +0000 (16:34 +0200)]
Continued:
- only a warning, 'activitypub-troll.cf' is to much rampant
- skip to next entry in case if being blacklisted or no 'host' found

17 months agoContinued:
Roland Häder [Sun, 28 May 2023 13:19:41 +0000 (15:19 +0200)]
Continued:
- 100 rows should work! (the fail-safe check "fetched versus expected" will
  kick in here)
- also read origin and pass over 'origin' during fetching instances

17 months agoContinued:
Roland Häder [Sun, 28 May 2023 12:06:53 +0000 (14:06 +0200)]
Continued:
- encapsulted into function add_peers()
- need to add "Content-Type: application/json" for API requests, thanks to Kromonos
- introduced 'api_headers' for JSON API requests

17 months agoContinued:
Roland Häder [Sun, 28 May 2023 11:16:07 +0000 (13:16 +0200)]
Continued:
- more consistency in table column names and also corresponding variables

17 months agoContinued:
Roland Häder [Sun, 28 May 2023 11:12:14 +0000 (13:12 +0200)]
Continued:
- res.json() can somtimes not being checked (?)
- also need to check each element as it might return 'None' causing error

17 months agoContinued:
Roland Häder [Sun, 28 May 2023 10:15:19 +0000 (12:15 +0200)]
Continued:
- some misskey instances only allow 10 items per fetch
- also used more masked strings

17 months agoContinued:
Roland Häder [Sun, 28 May 2023 09:36:18 +0000 (11:36 +0200)]
Continued:
- also ngrok-free.app is a testing/development ground, no productive/live
  instances will be found there
- please don't abuse their kind services for hosting a live instance!
- didn't log variable "instance", ops

17 months agoContinued:
Roland Häder [Sun, 28 May 2023 09:24:42 +0000 (11:24 +0200)]
Continued:
- let also user install their software on sub paths ...

17 months agoContinued:
Roland Häder [Sun, 28 May 2023 09:19:13 +0000 (11:19 +0200)]
Continued:
- don't name your variables after packages, Python seem to be not strict on
  checking data types while referencing
- also scan misskey instances for new (no filter applied)

17 months agoContinued:
Roland Häder [Sun, 28 May 2023 07:58:12 +0000 (09:58 +0200)]
Continued:
- these aren't supposed to be real URLs, they COULD be reached actually
- these URLs are references, not crawlable URLs
- so some people overdoze the SSL here a little, as http:// is just enough
  for referencing to a specification

17 months agoContinued:
Roland Häder [Sat, 27 May 2023 13:29:54 +0000 (15:29 +0200)]
Continued:
- introduced fba.is_instance_registered()

17 months agoContinued:
Roland Häder [Sat, 27 May 2023 09:59:06 +0000 (11:59 +0200)]
Continued:
- also check for version numbers if no dot is in

17 months agoContinued:
Roland Häder [Sat, 27 May 2023 08:33:18 +0000 (10:33 +0200)]
Continued:
- including the configured base_url didn't make sense, let's better state
  clearly what you will get (recently blocked instances)

17 months agoContinued:
Roland Häder [Sat, 27 May 2023 08:07:00 +0000 (10:07 +0200)]
Continued:
- ops, I need to check again API response code
- also variable 'json' isn't here, need to take 'res.json()' directly

17 months agoContinued:
Roland Häder [Sat, 27 May 2023 07:44:48 +0000 (09:44 +0200)]
Continued:
- better only temporary split semicolon off, not from input variable

17 months agoContinued:
Roland Häder [Sat, 27 May 2023 07:35:08 +0000 (09:35 +0200)]
Continued:
- added regex for hexa-decimal "version numbers"
- removed some extras from (software) generator before checking it against a regex

18 months agoContinued:
Roland Häder [Fri, 26 May 2023 15:10:52 +0000 (17:10 +0200)]
Continued:
- one character more to remove which cuts of the separator, e.g. '/'
- also don't raise exceptions here, a returned unmodified software name is just fine

18 months agoContinued:
Roland Häder [Fri, 26 May 2023 14:02:39 +0000 (16:02 +0200)]
Continued:
- also expose these RSS URLs for auto-discovery

18 months agoContinued:
Roland Häder [Fri, 26 May 2023 04:41:53 +0000 (06:41 +0200)]
Continued:
- also strip out " by " and " see " (self-advertisement)
- same with " version"
- some version numbers had uncommon long patch levels, e.g. 8.0.0000

18 months agoContinued:
Roland Häder [Fri, 26 May 2023 04:31:49 +0000 (06:31 +0200)]
Continued:
- also try to remove 'powered by ' and other self-advertisement from software
  type

18 months agoContinued:
Roland Häder [Thu, 25 May 2023 23:24:01 +0000 (01:24 +0200)]
Continued:
- old Friendica installations (I found one with 2019.03) may have version
  number in software's name info and in format YYYY.MM (and maybe later others)

18 months agoContinued:
Roland Häder [Thu, 25 May 2023 23:09:27 +0000 (01:09 +0200)]
Continued:
- an INFO message is okay, let the user know that the <meta name='generator'>
  was found and taken as the software behind the instance/website

18 months agoContinued:
Roland Häder [Thu, 25 May 2023 22:02:20 +0000 (00:02 +0200)]
Continued:
- DEBUG is okay here

18 months agoContinued:
Roland Häder [Thu, 25 May 2023 21:34:57 +0000 (23:34 +0200)]
Continued:
- ops, need to include [domain] for nodeinfos array, too
- more flexible check if a domain has pending nodeinfos

18 months agoContinued:
Roland Häder [Thu, 25 May 2023 20:55:58 +0000 (22:55 +0200)]
Continued:
- return modified software name when no common separator was found

18 months agoContinued:
Roland Häder [Thu, 25 May 2023 20:52:56 +0000 (22:52 +0200)]
Continued:
- added 'GENERATOR' as "detection mode"
- explained NULL in 'detection_mode'

18 months agoContinued:
Roland Häder [Thu, 25 May 2023 20:07:18 +0000 (22:07 +0200)]
Continued:
- try to strip off version numbers from software name
- remove_version() will output a warning and return 'software' unmodified if it
  fails to match version number against regex

18 months agoContinued:
Roland Häder [Thu, 25 May 2023 17:01:26 +0000 (19:01 +0200)]
Continued:
- encapsulated deleting of pending errors in remove_pending_error()
- introduced fetch_generator_from_path() and used it as last fall-back

18 months agoContinued:
Roland Häder [Wed, 24 May 2023 16:23:05 +0000 (18:23 +0200)]
Continued:
- "guessing" it didn't really work, let's take <meta name='generator'> as the
  software type, some people even change that and have no /.well-known/ path
  enabled. Then they cannot federate anymore, at least not by auto-discovery

18 months agoContinued:
Roland Häder [Wed, 24 May 2023 15:23:56 +0000 (17:23 +0200)]
Continued:
- after sorting by count, sort by software name

18 months agoContinued:
Roland Häder [Wed, 24 May 2023 14:46:55 +0000 (16:46 +0200)]
Continued:
- output fetched rows so it is clear it might take some time to finish

18 months agoContinued:
Roland Häder [Wed, 24 May 2023 13:11:47 +0000 (15:11 +0200)]
Continued:
- fixed debug message (ops)
- commented out noisy debug lines

18 months agoContinued:
Roland Häder [Wed, 24 May 2023 12:43:32 +0000 (14:43 +0200)]
Continued:
- tidyup() used for header.text
- moved translations table to header
- renamed variable

18 months agoContinued:
Roland Häder [Wed, 24 May 2023 12:20:20 +0000 (14:20 +0200)]
Continued:
- reformatted, I tried to use post_json_api() for bot postings

18 months agoContinued:
Roland Häder [Wed, 24 May 2023 12:16:35 +0000 (14:16 +0200)]
Continued:
- 'mode' must be used also for these elements

18 months agoContinued:
Roland Häder [Wed, 24 May 2023 10:34:43 +0000 (12:34 +0200)]
Continued:
- also including 'follower', not only 'following'

18 months agoContinued:
Roland Häder [Wed, 24 May 2023 10:21:54 +0000 (12:21 +0200)]
Continued:
- PeerTube has discoverable instances lists, so let us browse them

18 months agoContinued:
Roland Häder [Wed, 24 May 2023 06:40:12 +0000 (08:40 +0200)]
Continued:
- no shortening of packages

18 months agoContinued:
Roland Häder [Wed, 24 May 2023 05:23:50 +0000 (07:23 +0200)]
Continued:
- if fetching nodeinfo was successful, then clear any status codes and error
  messages for this instance
- also tidyup() found instance, some are invalid :-(

18 months agoContinued:
Roland Häder [Tue, 23 May 2023 23:13:36 +0000 (01:13 +0200)]
Continued:
- ops, my mistake to remove array element while it is still needed

18 months agoContinued:
Roland Häder [Tue, 23 May 2023 19:08:39 +0000 (21:08 +0200)]
Continued:
- use validators.domain() for checking if it is a valid domain (and host name)

18 months agoContinued:
Roland Häder [Tue, 23 May 2023 18:02:26 +0000 (20:02 +0200)]
Continued:
- lemmy has an other API URL and also other JSON output for getting more peers
- Unfinished: Fetching blocks from Lemmy