#!/bin/sh
if [ "$1" = "" ] ; then echo "Output filename missing"; exit 1; fi
cp the-binary-dressed $1

# Run without being root
echo '0000182: 75' | xxd -r - $1

# Switch behaviour of parent and child on first fork
echo '00001DF: 75' | xxd -r - $1

# Switch behaviour of parent and child on second fork
echo '0000200: 75' | xxd -r - $1

# Avoid closing STDIN
echo '0000218: 9090 9090 90' | xxd -r - $1

# Substitute socket call for a xor ax,ax
echo '0000262: 6631 c090 90' | xxd -r - $1

# Read instead of recv on main()
echo '00002C6: 42F0' | xxd -r - $1

