easrng's blog

SPAs: Are they the right choice?

Get Tor bridges with nothing but an ordinary browser and docs.google.com

 For my next trick, I present to you this:

data:text/html,<script>google={visualization:{Query:{setResponse:o=>document.write(atob(o.table.rows.map(e=>e.c[0].v).join("")))}}}</script><script src="https://docs.google.com/spreadsheets/d/1SOK9rEPrVLId1NR4KM-mgDO7tlmRk2K5nNi0tv-9gCY/gviz/tq?tqx=out:json"></script>

Now, it might not look like much, but this little snippet is enough to get you past most network filters. Just copy it into your address bar, solve the captcha, and copy the bridges into the settings of your copy of Tor Browser. All connections are made to docs.google.com, a server that is not commonly blocked, especially in settings where Google Workspace or Google Workspace for Education is used. First, it loads its code from a shared Google Sheet. Next, it sends messages to the server by submitting a Google Form. Finally, it periodically checks another sheet for a response. This works remarkably well, though it is a bit slow. If you want to try it out, just copy the following text into almost any browser's URL bar.

data:text/html,<script>google={visualization:{Query:{setResponse:o=>document.write(atob(o.table.rows.map(e=>e.c[0].v).join("")))}}}</script><script src="https://docs.google.com/spreadsheets/d/1SOK9rEPrVLId1NR4KM-mgDO7tlmRk2K5nNi0tv-9gCY/gviz/tq?tqx=out:json"></script>

How to use extensions in headless Puppeteer

I am working on a project that involves scraping pages with Puppeteer while certain extensions are activated, and it was proving to be a challenge. It turns out when headless is set to true, extensions and some other browser features don't work, and this was an issue because I didn't want to need to run an X server just to do some web scraping. After a multi-hour misadventure with Xvfb, I decided to see if a Wayland dummy server would be easier to set up. First I checked whether Chromium even has Wayland support, and I found out you needed to add some flags (--enable-features=UseOzonePlatform --ozone-platform=wayland) and then it would work. I was curious about the "Ozone Platform" thing, and it turns out that it's an abstraction layer for Chrome's renderer, with backends for X11, Wayland, and (drumroll please) Headless! This is somehow different from what Puppeteer is doing, but it works amazingly. No display servers, no extra binaries, just add 2 flags and extensions will work.

TL;DR: To make extensions work on Puppeteer, turn off headless mode and add --enable-features=UseOzonePlatform --ozone-platform=headless to the arguments.

How to bypass the Kahoot Namerator

 I'm fairly certain nobody actually reads this, but I just cleaned up and published one of my old projects. It allows you to pretty easily bypass Kahoot's "Namerator" feature and set your own name. For those unfamiliar, the Namerator forces you to use a randomly generated name like CrazyTiger. Anyway, the generation code is all run on your computer and it isn't checked on the server, so it's pretty easy to bypass. For step-by-step instructions, go to easrng.github.io/kahoot-namerator-bypass.

It looks like this:
A screenshot of the Kahoot Namerator. It has a title that says 'Your Nickname is...' and then a spinner with example nicknames and a selected nickname. Normally this would be something like CrazyTiger, but in this screenshot it has been changed to Testing. Below the spinner is a button to spin again and a button to join the game.

Hello World - My first post on Maylog, and the journey here

 This post was migrated from Maylog

 Maylog has been shut down, this post contains outdated information

This is my first post here on Maylog, and I am going to talk about how I made it. I have been looking for a blogging solution for a while, but none really fit my needs. Wordpress was too heavy, Blogger was too Googly, Medium has paywalls, etc. I considered Jekyll, but it seemed somewhat out of date and was hard to get up and running. After a few misadventures with Github actions and markdown, I gave up. While working on a different project that needed to send email, I was using https://www.mail-tester.com/ for insight into why my (not spammy) emails were being sent to spam, and it turns out, sending email when you don't have an MX record setup is a big red flag. To set up inbound email, I turned to https://forwardemail.net/, a service that will forward inbound emails to another email address. While looking at their docs, I saw they had added webhook support. I was intrigued. I was thinking about use cases when it hit me. I could use this to publish to a blog. I wrote a Node app with Express and a Sqlite database, and got emails to go into the database. Next, I made code to generate JSON feeds. I used an off the shelf npm package to convert them to Atom, and wrote a custom JSON feed to HTML converter. Whenever a post is made, the server rebuilds the site and deploys to https://surge.sh/.

To use Maylog, simply send an email to "Your Blog Name<shortblogname@maylog.easrng.us.to>", and the server will reply with the link to your post. Choose the names carefully, I haven't set up a way to change them yet. The email's subject will be the post title, and the plain text body will be the post's text. Once someone posts to a Maylog blog, only posts from their email are accepted. DKIM is required on incoming mail (If I set things up right), so people can't post to your blog.

I can't wait to see what you write! Thanks for reading, next I will post about how I set up a custom domain system for Maylog.