MakeStr 在7.0版本中使用会报错,6.8版本每问题,细究原因,属于脚本二次传参错误bug,
可以
将
D:\IDA 7.0\python\idc_bc695.py
中,113行的
def MakeStr(ea, endea): return create_strlit(ea, 0 if (endea) == ida_idaapi.BADADDR else endea-ea)
屏蔽掉,然后修正添加如下即可
def MakeStr(ea, endea): return create_strlit(ea, endea)
最后reload下idc模块即可
强迫症,将原来的屏蔽后,在原来行修正,避免万一以后还有bug修正某某行,与国际错误行信息不对接
def MakeStr(ea, endea): return create_strlit(ea, endea) #
def MakeStr(ea, endea): return create_strlit(ea, 0 if (endea) == ida_idaapi.BADADDR else endea-ea)
Python>idc.MakeStr(0x413000,BADADDR)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\IDA 7.0\python\idc_bc695.py", line 113, in MakeStr
#def MakeStr(ea, endea): return create_strlit(ea, 0 if (endea) == ida_idaapi.BADADDR else endea-ea)
File "D:\IDA 7.0\python\idc.py", line 695, in create_strlit
return ida_bytes.create_strlit(ea, 0 if endea == BADADDR else endea - ea, get_inf_attr(INF_STRTYPE))
File "D:\IDA 7.0\python\ida_bytes.py", line 1618, in create_strlit
return _ida_bytes.create_strlit(*args)
OverflowError: in method 'create_strlit', argument 2 of type 'size_t'
Python>reload(idc)
<module 'idc' from 'D:\IDA 7.0\python\idc.pyc'>
Python>idc.MakeStr(0x413000,BADADDR)
True
[课程]Linux pwn 探索篇!