File: asm.py

package info (click to toggle)
pwntools 4.14.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 18,436 kB
  • sloc: python: 59,156; ansic: 48,063; asm: 45,030; sh: 396; makefile: 256
file content (13 lines) | stat: -rw-r--r-- 265 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
"""
Example showing the interface to `pwnlib.asm.asm` and `pwnlib.shellcraft`.
"""

from pwn import *

context(arch='i386', os='linux')

shellcode = shellcraft.i386_to_amd64()
shellcode_asm = asm(shellcode)

print(enhex(shellcode_asm))
print(disasm(shellcode_asm))