Gallopsled/pwntools

shellcraft.mov does not support AH, BH, etc. registers

Open

#1.046 aberto em 8 de out. de 2017

Ver no GitHub
 (1 comment) (0 reactions) (0 assignees)Python (1.684 forks)batch import
Hacktoberfestenhancementhelp-wantedshellcode

Métricas do repositório

Stars
 (11.127 stars)
Métricas de merge de PR
 (Mesclagem média 18d 5h) (5 fundiu PRs em 30d)

Description

from pwn import *
# context.arch = 'i386'
print shellcraft.mov('eax', 'ah')

Expected: movzx eax, ah

Result:

NameError: name 'ah' is not defined

The error is raised when trying to eval ah as a system-constant value

But the real reason is ah is not defined in shellcraft/registers.py as a register in i386.

Issue occurs in amd64 as well.

Guia do colaborador