Gallopsled/pwntools

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

Open

#1.046 geöffnet am 8. Okt. 2017

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Python (1.684 Forks)batch import
Hacktoberfestenhancementhelp-wantedshellcode

Repository-Metriken

Stars
 (11.127 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 18T 5h) (5 gemergte PRs in 30 T)

Beschreibung

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.

Contributor Guide