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.

贡献者指南