3 ms·
When I wrote my own brainf*ck interpreter (in C) at the start of the year I was really struggling to find a use for the language. Eventually I had the idea to o
by binaryturtle 6mo ago
When I wrote my own brainf*ck interpreter (in C) at the start of the year I was really struggling to find a use for the language. Eventually I had the idea to obfuscate emails on my websites with the language.
Basically each email gets written as a brainf*ck program and stored in a "data-" attribute. The html only includes a more primitively obfuscated statement "Must enable Javascript to see e-mail." by default which then gets replaced by another brainf*ck interpreter (in JS) with the output of the brainf*ck code. Since we only output ASCII we can reduce the size of the brainf*ck code by always adding 32 to each value it outputs. The Javascript is loaded from what seemingly looks like a 3rd party domain. There we filter basing on heuristics and check if the "referer" matches before sending out the actual interpreter code.
Of course all this would not help if a scraper properly runs things through Javascript too.
Recently I read you soon will be able to run DOOM via CSS, so certainly it should be possible to have a brainf*ck interpreter in CSS? That would be the next step… just to get rid of the Javascript, but then I'm okay with all the downsides of using Javascript just for the e-mail obfuscation.
Anyway… I also regularly (at least once a year) rotate those public contact addresses.
- Borealid 6mo agoHow does this approach meaningfully differ from having javascript that XORs the email with a random sequence of bytes stored in that JS?
- binaryturtle 6mo agoIt's more fun? :) /edit And you can combine both approaches: XOR'ing the code first for good measurements. :)
- robotswantdata 6mo agoHow does that work if the scraper takes a screenshot to feed to a LLM or OCR?
- yummypaint 6mo agoThat seems like a very expensive way to crawl the internet
- robotswantdata 6mo agoScrape normally collect emails, if no email seen take screenshot and OCR OCR is cheap and REGEX is cheap
- woctordho 6mo agoIt would be interesting to show bf code rather than the actual email on the webpage. A lot of OCR systems struggle with this kind of repeated symbols where the exact count is required.