Known Bots

Known Bots 6.3.3

No permission to download
Hello, will the plugin be receiving an update soon? For example, AI support or something similar?

Very much on my todo list.

I've just finished an update to the addon which is mostly just bugfixes and cleanup - will be releasing it soon once I've completed some live testing on my own production servers. But that release won't include any new features.

The main work will be AI enabling my KnownBots management console - which is a pretty sophisticated Laravel application I built specifically to manage the bot reports I receive from the addons installed on various forums and generate the bot lists and search terms I use in the addon. I want to teach AI to recognise bots in user agents and have it manage that in bulk - I'm a long way behind in identifying all of the bots, so I want to automate that as much as possible.

While that is still a priority - my main priority in the short term is getting my two legacy XF 1.5 forums upgraded to XF 2.x - something I'm making very good progress on finally. We're rapdidly approaching 10 years since XenForo 2.0 saw the light of day - and it's already more than 7 years since XenForo 1.5 became EOL :oops:

So yes, the addon will be receiving an update soon - but it's just bugfixes, no new functionality.

It will take a little while longer but I do hope to have a lot more bots identified by the addon in due course.
 
Hi Simon

Got this since a few days..

  • Hampel\KnownBots\Exception\CustomerException: Customer error validating license token: 404 Not Found
  • src/addons/Hampel/KnownBots/Api/KnownBots.php:146
  • Generated by: Unknown user account
  • October 2, 2026 at 1:03 PM

Stack-Trace​

#0 src/addons/Hampel/KnownBots/SubContainer/Api.php(102): Hampel\KnownBots\Api\KnownBots->validate('4c7ca43f58d4ec4...', 'https://www.sys...')
#1 src/addons/Hampel/KnownBots/Service/UserAgentSender.php(64): Hampel\KnownBots\SubContainer\Api->validate('4c7ca43f58d4ec4...')
#2 src/addons/Hampel/KnownBots/Cron/SendAgents.php(71): Hampel\KnownBots\Service\UserAgentSender->sendUserAgents()
#3 src/addons/Hampel/KnownBots/Cron/SendAgents.php(42): Hampel\KnownBots\Cron\SendAgents::sendApi(Array)
#4 src/XF/Job/Cron.php(41): Hampel\KnownBots\Cron\SendAgents::send(Object(XF\Entity\CronEntry))
#5 src/XF/Job/Manager.php(275): XF\Job\Cron->run(8)
#6 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 8)
#7 src/XF/Job/Manager.php(89): XF\Job\Manager->runJobEntry(Array, 8)
#8 src/XF/Cli/Command/RunJobs.php(58): XF\Job\Manager->runQueue(false, 8)
#9 src/vendor/symfony/console/Command/Command.php(298): XF\Cli\Command\RunJobs->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 src/vendor/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 src/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand(Object(XF\Cli\Command\RunJobs), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 src/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 src/XF/Cli/Runner.php(115): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 cmd.php(17): XF\Cli\Runner->run()
#15 {main}

Request status​

array(1) {
["cli"] => string(68) "/var/www/vhosts/sysops-finest.org/httpdocs/forum/cmd.php xf:run-jobs"
}
What can I do?
 
Hi Simon

Got this since a few days..

  • Hampel\KnownBots\Exception\CustomerException: Customer error validating license token: 404 Not Found
  • src/addons/Hampel/KnownBots/Api/KnownBots.php:146
  • Generated by: Unknown user account
  • October 2, 2026 at 1:03 PM

Re-enter your xenforo.com license validation token via the options or disable sending user agents via API.

1790990058205.webp
 
Sim updated Known Bots with a new update entry:

v6.3.0 - bugfixes, security updates and expanded support

Now supports XF 2.2 again

6.3.0 (2026-10-13)​

  • new: known-bots:config prints every setting this addon uses and where each one comes from, including the state that is not on any one screen in the admin control panel - the bot definitions on disk, the code cache detection reads, the stored user agent counts and the three cron entries. Settings which hold a credential are reported as set or not set, never printed
  • new:...

Read the rest of this update entry...
 
@Sim

I don't know if this is correct, but my Norton alerted me to the following:

Screenshot 2026-10-13 at 9.08.26 AM.webp Screenshot 2026-10-13 at 9.08.38 AM.webp


I never had any alerts previously from any of your downloads. I'm thinking this is a false positive from an over-zealous antivirus app, but I'm going to check it out further.
 
I don't know if this is correct, but my Norton alerted me to the following:

Thanks for the report. After doing some research on that threat detection, it seems as though Norton is being quite over-zealous about links in .md files and this is basically a false-positive.

I've reported it to Norton as a false positive, but it's likely that their scanner is simply being fussy about links - so it's likely to continue being a problem as I add links for new bots in future. I'm working with Claude to come up with an alternative packaging for the addon that avoids this issue moving forward.

I'm 100% confident that the addon is safe - I've triple-checked - but I'll see if I can come up with a release zip that doesn't trip Norton's scanner anyway.
 
After further testing (thanks to @gerryvz for your help!), I'm still confident that the released zip file is fine and that the issue was a false positive.

If anyone else finds the zip file flagged by their antivirus - please do let me know the details and I'll investigate further (make sure your AV definitions are up to date first!).

There are some .md documentation files in the addon which can be stripped out if necessary to try and avoid the issue, which I'll do for the next release and I can bring that forward if necessary due to further antivirus reports.
 
I'm getting some memory exhaustion errors on the cron job to look for new bots.

perhaps there's some room to make this more efficient?



Server error log
  • ErrorException: Fatal Error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 2097152 bytes)
  • src/XF/Mvc/Entity/Manager.php:617
  • Generated by xxxxx
  • Nov 18, 2026 at 7:45 PM

Stack trace​

#0 [internal function]: XF::handleFatalError()
#1 {main}

Request state​

array(4) {
["url"] => string(54) "/admin.php?cron/hampelKnownBotsFetchBots/run"
["referrer"] => string(56) "/admin.php?cron/"
["_GET"] => array(1) {
["cron/hampelKnownBotsFetchBots/run"] => string(0) ""
}
["_POST"] => array(1) {
["_xfToken"] => string(8) "********"
}
}
 
  • Like
Reactions: Sim
I'm getting some memory exhaustion errors on the cron job to look for new bots.

perhaps there's some room to make this more efficient?



Server error log
  • ErrorException: Fatal Error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 2097152 bytes)
  • src/XF/Mvc/Entity/Manager.php:617
  • Generated by xxxxx
  • Nov 18, 2026 at 7:45 PM

Stack trace​

#0 [internal function]: XF::handleFatalError()
#1 {main}

Request state​

array(4) {
["url"] => string(54) "/admin.php?cron/hampelKnownBotsFetchBots/run"
["referrer"] => string(56) "/admin.php?cron/"
["_GET"] => array(1) {
["cron/hampelKnownBotsFetchBots/run"] => string(0) ""
}
["_POST"] => array(1) {
["_xfToken"] => string(8) "********"
}
}

Confirmed - thanks. If you have a very large number of user agents in the database, it can consume all available memory trying to read them all.

Next release processes them in batches rather than trying to read everything in at once.

You can work around this for now by running the Purge old user agents command from Admin CP > Tools > Known Bots > List detected bots > Purge old user agents

Also make sure you don't have "Store user agents in database and purge after:" set to 0, because then it will never purge agents.

I'll post a new version soon once I've had a chance to test things first.
 
Sim updated Known Bots with a new update entry:

v6.3.2 bugfixes, code cleanup, memory usage improvements

6.3.2 (2026-11-20)​


  • known-bots:validate's checks are now declared to any addon that runs a forum's self-checks over an API, so they can be read without a shell on the server. Only each check's outcome is returned, and the API token check, which reaches the KnownBots API, is listed as skipped
  • an API that is temporarily unavailable is no longer written to the server error log when sending user agents, checking the API token or running...

Read the rest of this update entry...
 
I installed the latest version and got this server error:

ErrorException: File clean up job failed for Hampel/KnownBots due to write permissions. Legacy files may need to be cleaned up manually. src/XF/Error.php:81
Generated by: Unknown account 21 November 2026 at 23:56

Stack trace

#0 src/XF.php(270): XF\Error->logError(Object(XF\Phrase), false)
#1 src/XF/Job/FileCleanUp.php(115): XF::logError(Object(XF\Phrase))
#2 src/XF/Job/FileCleanUp.php(52): XF\Job\FileCleanUp->stepDeleteFiles(7.89049)
#3 src/XF/Job/Manager.php(275): XF\Job\FileCleanUp->run(7.89049)
#4 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 7.89049)
#5 src/XF/Job/Manager.php(89): XF\Job\Manager->runJobEntry(Array, 7.89049)
#6 src/XF/Cli/Command/RunJobs.php(58): XF\Job\Manager->runQueue(false, 8)
#7 src/vendor/symfony/console/Command/Command.php(298): XF\Cli\Command\RunJobs->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 src/vendor/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 src/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand(Object(XF\Cli\Command\RunJobs), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 src/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 src/XF/Cli/Runner.php(115): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 cmd.php(17): XF\Cli\Runner->run()
#13 {main}

Request state

array(1) {
["cli"] => string(33) "/var/www/live/cmd.php xf:run-jobs"
}
 
I installed the latest version and got this server error:

ErrorException: File clean up job failed for Hampel/KnownBots due to write permissions. Legacy files may need to be cleaned up manually. src/XF/Error.php:81
Generated by: Unknown account 21 November 2026 at 23:56

Stack trace

#0 src/XF.php(270): XF\Error->logError(Object(XF\Phrase), false)
#1 src/XF/Job/FileCleanUp.php(115): XF::logError(Object(XF\Phrase))
#2 src/XF/Job/FileCleanUp.php(52): XF\Job\FileCleanUp->stepDeleteFiles(7.89049)
#3 src/XF/Job/Manager.php(275): XF\Job\FileCleanUp->run(7.89049)
#4 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 7.89049)
#5 src/XF/Job/Manager.php(89): XF\Job\Manager->runJobEntry(Array, 7.89049)
#6 src/XF/Cli/Command/RunJobs.php(58): XF\Job\Manager->runQueue(false, 8)
#7 src/vendor/symfony/console/Command/Command.php(298): XF\Cli\Command\RunJobs->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 src/vendor/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 src/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand(Object(XF\Cli\Command\RunJobs), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 src/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 src/XF/Cli/Runner.php(115): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 cmd.php(17): XF\Cli\Runner->run()
#13 {main}

Request state

array(1) {
["cli"] => string(33) "/var/www/live/cmd.php xf:run-jobs"
}

That message comes from XenForo's legacy-file clean-up, which runs after an add-on upgrade and deletes files the previous version shipped that aren't included in the new version. It stopped at a file the account running cmd.php can't write to. The add-on itself is fine, and nothing it needs is affected.

To see which files it wanted to remove, run this. It only lists them and deletes nothing:

php cmd.php xf:file-clean-up Hampel/KnownBots --dry-run

Then check their owner and permissions with ls -l. Usually the add-on's files are owned by a different user from the one running the job. Fix the ownership, or delete the listed files yourself.

If the list includes anything under .git/, don't run the command without --dry-run: it would delete your git repository. In that case, just delete the other listed files by hand.
 
That message comes from XenForo's legacy-file clean-up, which runs after an add-on upgrade and deletes files the previous version shipped that aren't included in the new version. It stopped at a file the account running cmd.php can't write to. The add-on itself is fine, and nothing it needs is affected.

To see which files it wanted to remove, run this. It only lists them and deletes nothing:

php cmd.php xf:file-clean-up Hampel/KnownBots --dry-run

Then check their owner and permissions with ls -l. Usually the add-on's files are owned by a different user from the one running the job. Fix the ownership, or delete the listed files yourself.

If the list includes anything under .git/, don't run the command without --dry-run: it would delete your git repository. In that case, just delete the other listed files by hand.
Thanks for the explanation, Sim, but I'm running XenForo Cloud, so I don't have access to the server and as such can't do what you suggest. And I know XF support won't help with problems with add-ons.

Would removing the add-on completely and re-installing it be a fix? That is assuming it would purge all files?
 
Would removing the add-on completely and re-installing it be a fix? That is assuming it would purge all files?

If nothing else is broken, then there's no further action you need to take.

The file cleanup operation is optional (most addons won't trigger it), and it runs after all addon operations have completed during install - so the install should be fine and everything else should be fine, it just wasn't able to complete the cleanup operation fully.
 
The file cleanup operation is optional (most addons won't trigger it), and it runs after all addon operations have completed during install - so the install should be fine and everything else should be fine, it just wasn't able to complete the cleanup operation fully.
Just an FYI, but running the file cleanup against XF itself is not optional if you've upgraded from XF2.2

I've had several clients experiencing site breaking behavior because incorrect versions of XF files are being used for whatever reason.
 
Just an FYI, but running the file cleanup against XF itself is not optional if you've upgraded from XF2.2

I've had several clients experiencing site breaking behavior because old XF versions are being incorrectly used for whatever reason.

Just to clarify - there's nothing an addon can do about that is there? That's a core issue rather than an addon issue?
 
Just to clarify - there's nothing an addon can do about that is there? That's a core issue rather than an addon issue?
Yes it is a core issue, but it manifests as an addon break in really weird ways.

It can also be an add-on issue if you rename Repository/Finder/etc classes.
 
  • Like
Reactions: Sim
Sim updated Known Bots with a new update entry:

v6.3.3 bugfixes

6.3.3 (2026-11-29)​

  • a failure to reach the KnownBots API that can pass by itself - the API down, or the forum's server unable to connect to it, time out or look it up - is now logged as a warning and retried on the next run, and is written to the server error log only once fetching or sending has failed for three days in a row. A failure that cannot pass by itself, such as the API refusing the request or a certificate problem, is still written there at once...

Read the rest of this update entry...
 
Back
Top Bottom