Gallopsled/pwntools

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

Open

#1046 aperta il 8 ott 2017

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)Python (1684 fork)batch import
Hacktoberfestenhancementhelp-wantedshellcode

Metriche repository

Star
 (11.127 star)
Metriche merge PR
 (Merge medio 18g 5h) (5 PR mergiate in 30 g)

Descrizione

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.

Guida contributor