LoginSignup
3
3

More than 5 years have passed since last update.

関数に名前を付ける簡単な IDAPython スクリプト

Posted at

IDA での解析中、自分で名前を付けた関数が Name ビューでソートしたときにまとまって表示されるように、zzz_ というプレフィックスを関数名に付けるようにしています。

そこで、関数内のどこにカーソルが置いてあっても、zzz_ プレフィックスを付加して関数に名前を割り振る簡単な IDAPython スクリプトを作りました。

from idaapi import *
from idautils import *

newFuncName = AskStr("CmdFunction", "Type function base name")
if not newFuncName is None:
    func = get_func(here())
    newName = "zzz_" + newFuncName
    Message("Renaming %s to %s\n" % (Name(func.startEA), newName))
    MakeNameEx(func.startEA, newName, SN_PUBLIC)
3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3