Writeup can be found here: [https://github.com/IARyan/CTFSolutions/blob/master/2018/TUCTF/shell-hard/shella-hard.py](https://github.com/IARyan/CTFSolutions/blob/master/2018/TUCTF/shell-hard/shella-hard.py)