Gallopsled/pwntools

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

Open

#1,046 建立於 2017年10月8日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)Python (1,684 fork)batch import
Hacktoberfestenhancementhelp-wantedshellcode

倉庫指標

Star
 (11,127 star)
PR 合併指標
 (平均合併 18天 5小時) (30 天內合併 5 個 PR)

描述

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.

貢獻者指南