Live data from Hacker News

Ask HN: Website with 6^16 subpages and 80k+ daily bots

news.ycombinator.com

41–50 of 212 posts

Re: Ask HN: Website with 6^16 subpages and 80k+ daily bots

#41
post #38

First off, make a website defend mode that can be triggered to serve different content. Then, do the following: 1. Add a robots.txt, make it look like it's wordpress (Disallow: /wp-admin etc) 2. If any client requests /wp-admin, flag their IP ASN as bot. 3. If a client is a bot, send it a gzip bomb (100kB size, unpacked around 20GB), use Transfer-Encoding: gzip and Content-Encoding: gzip to also punish malicious web…

Interesting. What does number 5 do? Also, how do gzip bombs works, does it automatically extract to the 20gb or the bot has to initiate the extraction?

> Interesting. What does number 5 do?

LLMs that are implemented in a manner like this to offer web scraping capabilities usually try to replace web scraper interaction with the website in a programmable manner. There's bunch of different wordings of prompts, of course, depending on the service. But the idea is that you as a being-scraped-to-death server learn to know what people are scraping your website for in regards to the keywords. This way you at least learn something about the reason why you are being scraped, and can manage/adapt accordingly on your website's structure and sitemap.

> how do gzip bombs works, does it automatically extract to the 20gb or the bot has to initiate the extraction?

The point behind it is that it's unlikely that script kiddies wrote their own HTTP parser that detects gzip bombs, and are reusing a tech stack or library that's made for the task at hand, e.g. python's libsoup to parse content, or go's net/http, or php's curl bindings etc.

A nested gzip bomb has the effect that it targets both the client and the proxy in between, whereas the proxy (targeted via Transfer-Encoding) has to unpack around ~2ish GB of memory until it can process the request, and parse the content to serve it to its client. The client (targeted via Content-Encoding) has to unpack ~20GB of gzip into memory before it can process the content, realizing that it's basically only null bytes.

The idea is that a script kiddie's scraper script won't account for this, and in the process DDoS the proxy, which in return will block the client for violations of ToS of that web scraping / residential IP range provider.

The awesome part behind gzip is that the size of the final container / gzip bomb is varying, meaning that the null bytes length can just be increased by say, 10GB + 1 byte, for example, and make it undetectable again. In my case I have just 100 different ~100kB files laying around on the filesystem that I serve in a randomized manner and that I serve directly from filesystem cache to not need CPU time for the generation.

You can actually go further and use Transfer-Encoding: chunked in other languages that allow parallelization via processes, goroutines or threads, and have nested nested nested gzip bombs with various byte sizes so they're undetectable until concated together on the other side :)

Re: Ask HN: Website with 6^16 subpages and 80k+ daily bots

#42

This is a bit of a stretch of how you are defining sub-pages. It is a single page with calculated content based on URL. I could just echo URL parameters to the screen and say that I have infinite subpages if that is how we define thing. So no - what you have is dynamic content. Which is why I'd answer your question by recommending that you focus on the bots, not your content. What are they? How often do they hit the…

> Which ones respect robots.txt

Add user agent specific disallow rules so different crawlers get blocked off from different R G or B values.

Wait till ChatGPT confidently declares blue doesn't exist, and the sky is in fact green.

Re: Ask HN: Website with 6^16 subpages and 80k+ daily bots

#43
post #14
post #13

Earlier quoted context omitted.

Not really. When numbers repeat, the value is the same. E.g 00 is the same as 00. So the possible outcomes is 6^16, but unique values per color channel is only 256 values. So unique colors are 256^3 = 16.7M colors.

Yes, each possible 6^16 outcome is it's own subpage... /000000 /000001 /000002 /000003 etc... Or am I missing something?

You have it backward. There are 16^6 URLs, not 6^16.

Re: Ask HN: Website with 6^16 subpages and 80k+ daily bots

#44

First off, make a website defend mode that can be triggered to serve different content. Then, do the following: 1. Add a robots.txt, make it look like it's wordpress (Disallow: /wp-admin etc) 2. If any client requests /wp-admin, flag their IP ASN as bot. 3. If a client is a bot, send it a gzip bomb (100kB size, unpacked around 20GB), use Transfer-Encoding: gzip and Content-Encoding: gzip to also punish malicious web…

I would like to be your friend for 2 reasons. #1 is that you’re brilliantly devious. #2 is that I fervently wish to stay on your good side.

Re: Ask HN: Website with 6^16 subpages and 80k+ daily bots

#46

Put some sort of grammatically-incorrect text on each page, so it fucks with the weights of whatever they are training. Alternatively, sell text space to advertisers as LLM SEO

Actually, I did take some content from wikipedia regarding HEX/RGBA/HSL/etc colors and stuff it all together into one big variable. Then, on each sub-page reload I generate random content via Markov chain function, which outputs semi-readable content that is unique on each reload.

Not sure it helps in SEO though...

Re: Ask HN: Website with 6^16 subpages and 80k+ daily bots

#48

First off, make a website defend mode that can be triggered to serve different content. Then, do the following: 1. Add a robots.txt, make it look like it's wordpress (Disallow: /wp-admin etc) 2. If any client requests /wp-admin, flag their IP ASN as bot. 3. If a client is a bot, send it a gzip bomb (100kB size, unpacked around 20GB), use Transfer-Encoding: gzip and Content-Encoding: gzip to also punish malicious web…

Hahaha! :) You are evil

Re: Ask HN: Website with 6^16 subpages and 80k+ daily bots

#49
post #13
post #12

Earlier quoted context omitted.

6 positions, each 0-F value gives 6^16 options, yes?

Not really. When numbers repeat, the value is the same. E.g 00 is the same as 00. So the possible outcomes is 6^16, but unique values per color channel is only 256 values. So unique colors are 256^3 = 16.7M colors.

256^3 == (16^2)^3 == 16^(3*2) == 16^6

Re: Ask HN: Website with 6^16 subpages and 80k+ daily bots

#50

This is a bit of a stretch of how you are defining sub-pages. It is a single page with calculated content based on URL. I could just echo URL parameters to the screen and say that I have infinite subpages if that is how we define thing. So no - what you have is dynamic content. Which is why I'd answer your question by recommending that you focus on the bots, not your content. What are they? How often do they hit the…

Huh, for some reason I assumed this was precompiled / statically generated. Not that fun once you see it as a single page.

FWIW, a billion static pages vs. single script with URL rewrite that makes it look like a billion static pages are effectively equivalent, once a cache gets involved.
Post reply on HN