Monday, March 7, 2016

Infinite loop on the command line using Python

Infinite loop on the command line using Python:

python -c "exec(\"import os\\nwhile True: os.system('.//prog')\")"

python -c "exec('import os\\nwhile True: os.system(\"./prog\")')"

(echo "import os" ; echo "while True: os.system('.//prog')") | python