10 lines
306 B
Markdown
10 lines
306 B
Markdown
|
# Extracting Opcode
|
||
|
|
||
|
## Extracting from ELF File
|
||
|
|
||
|
Extracting opcode from an ELF file can be done via the following way
|
||
|
|
||
|
```sh
|
||
|
objdump -d ./payload|grep '[0-9a-f]:'|grep -v 'file'|cut -f2 -d:|cut -f1-6 -d' '|tr -s ' '|tr '\t' ' '|sed 's/ $//g'|sed 's/ /\\x/g'|paste -d '' -s |sed 's/^/"/'|sed 's/$/"/g'
|
||
|
```
|