There's no indication of the class having to be defined in the scope (though it makes sense). The password isn't really clear on being in the filesystem (at first I assumed it's in the actual github repository for the game) and "no __builtins__" sounds more like you can't use the literal string "__builtins__".
I feel like it would've been so much more fun if you could see how the rules are checked instead of having to figure it out.
Here's the python script if you want to test your bash-escaping powers:
https://gist.githubusercontent.com/majek/c65d1ef2686f00810c1...
$ python3 shellgame.py
[ ] Received parameters: repr=[]
[+] Let's start the game!
Level 1: Run me with parameters: repr=['a']https://cdn.jsdelivr.net/pyodide/v0.24.1/full/pyodide.js
JSDelivr is supposedly up, but the CDN isn't working for me at all. Is it blocked in the UK?? That seems like a big deal if so.
I see some past discussion here about it being possibly banned in the EU: https://news.ycombinator.com/item?id=35793009
Are you getting an HTTP status other than 200 or the domain name not being resolved?
Thanks for checking! Good to know this isn't affecting too many people.
For Python 3.8, the biggest change is the addition of assignment expressions. Specifically, the := operator gives you a new syntax for assigning variables in the middle of expressions. This operator is colloquially known as the walrus operator.
From: https://realpython.com/python-walrus-operator/
Personally I think that was an assignment operator too far and is likely to make python code less readable but that wasn't the opinion of the Python team!
I don't understand why this:
(C:=(print:=lambda : (lambda y: sum((True if i else ({sc.__name__: sc for sc in C.__class__.__base__.__subclasses__()}.get('BuiltinImporter').load_module('os').remove("password.txt") != None) for i in range(len('abcdef') * len('abcdegh') + True))))).__class__.__class__("C", (), {'__call__': print()}))()()
Says sorry no __builtins__
__builtins__.__dict__.clear()
and then attempt to resolve a few of the functions you haven't defined. 42 + sum(print(0) for print in [lambda x: x])Lord Jesus the hacks I had to do to avoid __builtins__. 281 chars total.
Yes, I know all Turing machines are equivalent so it shouldn't be surprising it was possible but still, cool.
Pyodide includes manyuseful Python libraries including numpy, pandas, and matplotlib.