nuke/internal
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
..
actorify feat(store/bbolt): implement actor pattern (#1107) 2025-09-12 18:35:22 +00:00
dns Implement FCrDNS and other DNS features (#1308) 2025-11-26 22:24:45 -05:00
dnsbl Refactor and split out things into cmd and lib (#77) 2025-03-22 18:44:49 -04:00
glob feat: glob matching for redirect domains (#1084) 2025-09-06 15:46:18 +00:00
honeypot feat: first implementation of honeypot logic (#1342) 2025-12-16 04:14:29 -05:00
ogtags feat: writing logs to the filesystem with rotation support (#1299) 2025-11-21 11:46:00 -05:00
test feat: writing logs to the filesystem with rotation support (#1299) 2025-11-21 11:46:00 -05:00
clampip.go feat: first implementation of honeypot logic (#1342) 2025-12-16 04:14:29 -05:00
clampip_test.go feat: first implementation of honeypot logic (#1342) 2025-12-16 04:14:29 -05:00
gzip.go feat(lib): ensure that clients store cookies (#501) 2025-05-16 13:03:40 -04:00
hash.go perf: Replace internal SHA256 hashing with xxhash for 4-6x performance improvement (#676) 2025-06-16 22:53:53 -04:00
hash_bench_test.go perf: Replace internal SHA256 hashing with xxhash for 4-6x performance improvement (#676) 2025-06-16 22:53:53 -04:00
headers.go feat: first implementation of honeypot logic (#1342) 2025-12-16 04:14:29 -05:00
health.go feat(anubis): add /healthz route to metrics server (#843) 2025-07-17 00:31:18 +00:00
ja4h.go feat(cmd/anubis): capture ja4h fingerprints (#834) 2025-07-14 23:31:33 -04:00
listor.go feat(store/valkey): Add Redis(R) Sentinel support (#1294) 2025-11-18 09:55:19 -05:00
listor_test.go feat(store/valkey): Add Redis(R) Sentinel support (#1294) 2025-11-18 09:55:19 -05:00
log.go feat: writing logs to the filesystem with rotation support (#1299) 2025-11-21 11:46:00 -05:00
log_test.go internal/log: Implement logging of HOST when using subrequest auth (#1027) 2025-08-29 19:04:33 +00:00
mimetype.go fix(internal): register mime type for .mjs files (#577) 2025-05-28 13:52:48 +00:00
unbreakdocker.go feat(lib): use new challenge creation flow (#749) 2025-07-04 20:42:28 +00:00
xff_test.go Adds ability to toggle off stripping of private addrs from XFF (#619) 2025-06-09 13:33:19 +00:00