I am researching this bug here, where the first line of an arbitrary file can be leaked by triggering a SyntaxError using the compile()
function.
Is there a method of leaking the rest of the file, such as similar to the way Heartbleed leaks data from server memory?
In Heartbleed, you can open a listener port on your computer and spam the targeted server with a specially crafted request to leak the response bit-by-bit.
I am using a vulnerable python sandbox hosted on a server. The code is compiled on the server. With the bug above I can leak the first line of any file. Is there a way, using only builtins
and the standard library to leak the remaining lines of the file?