def echo(): user_input = input('enter some text: ') print('your text: {}'.format(user_input))
def echo(): user_input = input('enter some text: ') command = "print('your text: {}')".format(user_input) exec(command)
enter some text: '); print(10**2000) # your text: 1000000000000000000000...
That would print however many zeroes the user specified, and use a whole lot of memory. With some creativity it's possible to cause lots of havoc.
That would print however many zeroes the user specified, and use a whole lot of memory. With some creativity it's possible to cause lots of havoc.