shellcarver is a Carve shellcode within the memory using restrictive character set.
To calculate possible sub eax statements to help assist in carving code (or encoding) within memory based on a list of “allowed” bytes when during exploitation. msfvenom’s -b usually works well, but in this case manual encoding is required.
git clone https://github.com/breaktoprotect/shellcarver && cd shellcarver
python shell_carver.py \xaf\x75\xea\xaf