LoginSignup
0
0

More than 5 years have passed since last update.

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

Posted at

関数に名前を付ける簡単な IDAPython スクリプト の IDC スクリプト版です。

static name_custom_func()
{
  auto newName = AskStr("FuncName", "Input function name");
  if (newName != 0)
  {
    auto func = GetFunctionAttr(ScreenEA(), FUNCATTR_START);
    if (func != -1)
    {
      auto newFuncName = "zzz_" + newName;
      Message("Renaming %s to %s\n", GetFunctionName(func), newFuncName);
      MakeNameEx(func, newFuncName, SN_PUBLIC);
    }
  }
}

また、ida.idc に、上記の関数と一緒に、次のようなホットキー定義を書いておけば、Ctrl-N でスクリプトを起動することが出来ます。

static main(void)
{
  AddHotkey("Ctrl-N", "name_custom_func");
}
0
0
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
0
0