I am working on an assignment to perform an exploit using a rop chain. While I understand the basics behind rop, I don't know how to convert instructions like
xchg eax, esp; retn;
to their opcodes.
I tried using:
0:005> a
input> xchg eax,esp
but the address given just points to a totally different kind of instruction in my program. I believe it was an add command.