IDC Script- Create Unicode String

//
//    This idc adds shortcuts to create unicode strings.
//

#include <idc.idc>

static main()
{
    DelHotkey(“Shift+U”);

    AddHotkey(“Shift+U”,”createunicodestring”);
    Message(“Press Shift+U @ EA to create unicode string”);
   
    Message(“Registered idc functions”);
}

// http://www.hex-rays.com/products/ida/support/freefiles/ldrmodules.idc
static MakeNameWithType(ea, type)
{
  auto old_type;
  old_type = GetLongPrm(INF_STRTYPE);
  SetLongPrm(INF_STRTYPE, type);
  MakeStr(ea, BADADDR);
  SetLongPrm(INF_STRTYPE, old_type);
}

static createunicodestring()
{
    auto ea;
    ea= ScreenEA();
    MakeNameWithType(ea,ASCSTR_UNICODE);
}

Advertisements
This entry was posted in IDA Pro, Reversing and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s