Trap Bots on Your Server
maurycyz.com·12w·
Discuss: Hacker News
🕷️Web Crawling
Preview
Report Post

Aug 5, 2025 (Programming) (Software)

Here’s the code for my infinite nonsense crawler trap:

What follows is an explanation of how to set it up…

Training the Markov chain:

First, you’ll want to find three long-ish sources of text, between 1000 and 50,000 words. I used ebooks from Project Guttenberg, but long blog posts or Wikipedia articles will also work.

Save the text in files named “book1.txt”, “book2.txt” and “book3.txt”. Remove any page numbers, heading…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help