Blocking complete ASN IP ranges automatically on FreeBSD with pf based on nginx logs

Some time ago I though that putting up an AI poison maze on my site is a great way of doing something against bots that do not respect robots.txt. It was, until I got hit by botnets which never back off.