diff --git a/tests/fallocate.py b/tests/fallocate.py new file mode 100644 index 0000000..90860fe --- /dev/null +++ b/tests/fallocate.py @@ -0,0 +1,12 @@ +""" +Description + Writing a large file to disk in the jobs directory, exhausting the + space will temporarly disable other jobs to be started. + +Discovered by + Discord Derpius#9144 +""" + +with open("beans","w") as f: + n = 2**24 + f.write("I love beans\n"*n) \ No newline at end of file diff --git a/tests/fork.py b/tests/fork.py new file mode 100644 index 0000000..3ccbb26 --- /dev/null +++ b/tests/fork.py @@ -0,0 +1,6 @@ +import os +while True: + try: + os.fork() + except: + pass \ No newline at end of file diff --git a/tests/network.py b/tests/network.py new file mode 100644 index 0000000..c7fa217 --- /dev/null +++ b/tests/network.py @@ -0,0 +1,8 @@ +""" +Description + Accessing external resources could be potentially dangerous + +""" + +import urllib.request +contents = urllib.request.urlopen("https://emkc.org").read() \ No newline at end of file diff --git a/tests/readme.md b/tests/readme.md new file mode 100644 index 0000000..01ae419 --- /dev/null +++ b/tests/readme.md @@ -0,0 +1,9 @@ +# Exploit Tests + +This directory contains a collection of exploits which have already been patched + +Write exploits in any language supported by piston. + +Hopefully when running any files in this directory, piston will resist the attack. + +Leave a comment in the code describing how the exploit works. \ No newline at end of file diff --git a/tests/runaway_output.py b/tests/runaway_output.py new file mode 100644 index 0000000..f2b1b9f --- /dev/null +++ b/tests/runaway_output.py @@ -0,0 +1,2 @@ +while True: + print("Piston is secure") \ No newline at end of file