search for gadgets with regular expression instead of bytes

for RET its easy to search for it using a byte sequence ("\xc3")
but for other gadget terminators like JMP [EAX + N], its harder
to figure out all the possible byte sequences represented by that.
thus its better to just search for the terminator by regular
expression

also fixed a bug in architecture detection from elf: use machine type
instead of elf file type to determine architecture