nuke/test
Xe Iaso 122e4bc072
feat: first implementation of honeypot logic (#1342)
* feat: first implementation of honeypot logic

This is a bit of an experiment, stick with me.

The core idea here is that badly written crawlers are that: badly
written. They look for anything that contains `<a href="whatever" />`
tags and will blindly use those values to recurse. This takes advantage
of that by hiding a link in a `<script>` tag like this:

```html
<script type="ignore"><a href="/bots-only">Don't click</a></script>
```

Browsers will ignore it because they have no handler for the "ignore"
script type.

This current draft is very unoptimized (it takes like 7 seconds to
generate a page on my tower), however switching spintax libraries will
make this much faster.

The hope is to make this pluggable with WebAssembly such that we force
administrators to choose a storage method. First we crawl before we
walk.

The AI involvement in this commit is limited to the spintax in
affirmations.txt, spintext.txt, and titles.txt. This generates a bunch
of "pseudoprofound bullshit" like the following:

> This Restoration to Balance & Alignment
>
> There's a moment when creators are being called to realize that the work
> can't be reduced to results, but about energy. We don't innovate products
> by pushing harder, we do it by holding the vision. Because momentum can't
> be forced, it unfolds over time when culture are moving in the same
> direction. We're being invited into a paradigm shift in how we think
> about innovation. [...]

This is intended to "look" like normal article text. As this is a first
draft, this sucks and will be improved upon.

Assisted-by: GLM 4.6, ChatGPT, GPT-OSS 120b
Signed-off-by: Xe Iaso <me@xeiaso.net>

* fix(honeypot/naive): optimize hilariously

Signed-off-by: Xe Iaso <me@xeiaso.net>

* feat(honeypot/naive): attempt to automatically filter out based on crawling

Signed-off-by: Xe Iaso <me@xeiaso.net>

* fix(lib): use mazeGen instead of bsGen

Signed-off-by: Xe Iaso <me@xeiaso.net>

* docs: add honeypot docs

Signed-off-by: Xe Iaso <me@xeiaso.net>

* chore(test): go mod tidy

Signed-off-by: Xe Iaso <me@xeiaso.net>

* chore: fix spelling metadata

Signed-off-by: Xe Iaso <me@xeiaso.net>

* chore: spelling

Signed-off-by: Xe Iaso <me@xeiaso.net>

---------

Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-12-16 04:14:29 -05:00
..
anubis_configs feat(config): add ability to customize HTTP status codes Anubis returns (#393) 2025-04-29 15:13:44 -04:00
caddy docs: add caddy docs (#423) 2025-05-02 19:15:05 +00:00
cmd fix(lib): enable multiple consecutive slash support (#1155) 2025-09-27 13:44:46 -04:00
default-config-macro feat: default config macro (#1186) 2025-10-13 11:33:16 -04:00
docker-registry fix(data): add ruleset to explicitly allow Docker / OCI clients (#1253) 2025-11-08 00:17:25 +00:00
double_slash fix(lib): enable multiple consecutive slash support (#1155) 2025-09-27 13:44:46 -04:00
forced-language test: ensure FORCED_LANGUAGE works (#1083) 2025-09-05 22:07:17 +00:00
git-clone ci: fix tests (#1069) 2025-08-31 08:13:00 -04:00
git-push fix(data): add ruleset to explicitly allow Docker / OCI clients (#1253) 2025-11-08 00:17:25 +00:00
healthcheck ci: fix tests (#1069) 2025-08-31 08:13:00 -04:00
i18n test: add automated Pale Moon tests (#903) 2025-07-25 11:42:08 -04:00
k8s Add check endpoint which can be used with nginx' auth_request function (#266) 2025-04-25 17:38:02 +00:00
lib ci: fix tests (#1069) 2025-08-31 08:13:00 -04:00
log-file feat: writing logs to the filesystem with rotation support (#1299) 2025-11-21 11:46:00 -05:00
nginx-external-auth fix(lib): close open redirect when in subrequest mode (#1222) 2025-10-29 16:07:31 -04:00
palemoon fix(config): deprecate the report_as field for challenges (#1311) 2025-11-25 23:25:17 -05:00
pki Add check endpoint which can be used with nginx' auth_request function (#266) 2025-04-25 17:38:02 +00:00
robots_txt fix: SERVE_ROBOTS_TXT works again (#1229) 2025-10-31 09:08:33 -04:00
shared/www Add check endpoint which can be used with nginx' auth_request function (#266) 2025-04-25 17:38:02 +00:00
ssh-ci ci(ssh): don't print uname -av output (#1114) 2025-09-14 03:03:46 +00:00
unix-socket-xff feat(config): add ability to customize HTTP status codes Anubis returns (#393) 2025-04-29 15:13:44 -04:00
.gitignore feat: more elaborate XFF compute (#350) 2025-04-25 11:59:55 +00:00
go.mod feat: first implementation of honeypot logic (#1342) 2025-12-16 04:14:29 -05:00
go.sum feat: first implementation of honeypot logic (#1342) 2025-12-16 04:14:29 -05:00