import os
os.listdir('/')
The answer, by the way, is no.That's not malicious code... it removes files from a sandbox... you can refresh the page and see for yourself.
> And if you're so clever to post that code
There's no need to be rude... there's an honest question and lack of understanding in my post - educate me, don't talk down to me.
> why don't you try similar code to see if it really has access to your files
The question was if someone could break out of a sandbox, such as with Java Applets and Adobe Flash. I have no idea how to do that - I'm not a security specialist, nor some sort of hacker guy.
> The answer, by the way, is no.
From the sandbox and using the standard `import os`, ya, you're right. The question, again, is what if someone got outside the sandbox?
This is different from the examples you mention: there is no external software that creates the sandbox (whereas with Java and Flash you had to install those as plugins). It's really just Javascript as it is built into the browser. Any vulnerability in this "sandbox" is a vulnerability in the browser, not some 3rd party plugin.
Put differently, this pypy emulation is no different from the Javascript API that was in your browser already. This isn't a new plugin, just using Javascript to emulate Python through the Pypy interpreter.
There is no way that pypy.js is able to access local files on your machine outside of the browser sandbox.
2. uh ok I'll paste it into an editor and remove the added indentation and then copy&paste that to test it
3. ... ok. I'll look at the code and reformat every single line and copy&paste that
the oldest complaint abides