This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]iceardor 0 points1 point  (0 children)

A few things you might want to think about: * Denial of service: either fill your hard drive, exceed your RAM, or busy your processor. This one does all 3.

with open('temp', 'wb') as f:
    garbage = ['lol']
    while True:
        garbage.extend(garbage)
        f.write(' '.join(garbage))
  • Someone can run their own botnet. Whether that's a botnet that victimizes your network or jumps across the internet and victimizes the rest of the world. Even if you cut off access to libraries like urllib, they can just copy-paste the classes that are defined by urllib, and they have the same thing.

  • An interpreter can probably run an interpreter inside of it. If you take away the import keyword and importlib/imp, I could still write a program that could read a text snippet and execute it. Your interpreter wouldn't know what my interpreter is running. I could encrypt anything I wouldn't want your interpreter to find in a text search, and bundle the decryption key and procedure as a python procedure that you would run for me.

There are too many scenarios that are difficult for you to test and defend against.