Originally posted by netytan
lol freaking :). I have to dissagree though Strike, eval() can't execute an import statment, it just doesn't work :).
Well, yes it can, just not the way I posted. Observe:
>>> [x for x in os.listdir('.') if not x.startswith('.')]
['bin', 'code', 'deb', 'docs', 'misc', 'mp3', 'ogg', 'school', 'themes', 'wav', 'dcc', 'evolution', 'src', 'tmp', 'stuff-to-do', 'News', 'iso']
>>> eval('__import__("os").system("touch foo")')
0
>>> [x for x in os.listdir('.') if not x.startswith('.')]
['bin', 'code', 'deb', 'docs', 'misc', 'mp3', 'ogg', 'school', 'themes', 'wav', 'dcc', 'evolution', 'src', 'tmp', 'stuff-to-do', 'News', 'iso', 'foo']
Ta da. So if you really want to correct me earlier, just change "import os; os.system('rm -rf /')" to "__import__('os').system('rm -rf /')"