Gallopsled/pwntools

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

Open

#1 046 ouverte le 8 oct. 2017

Voir sur GitHub
 (1 commentaire) (0 réactions) (0 assignés)Python (1 684 forks)batch import
Hacktoberfestenhancementhelp-wantedshellcode

Métriques du dépôt

Stars
 (11 127 stars)
Métriques de merge PR
 (Merge moyen 18j 5h) (5 PRs mergées en 30 j)

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.

Guide contributeur