转载
ida 设置颜色
#---------------------------------------------------------------------
# Colour test
#
# This script demonstrates the usage of background colours.
#
# Author: Gergely Erdelyi <gergely.erdelyi@d-dome.net>
#---------------------------------------------------------------------
# Set the colour of the current segment to BLUE
SetColor(here(), CIC_SEGM, 0xc02020)
# Set the colour of the current function to GREEN
SetColor(here(), CIC_FUNC, 0x208020)
# Set the colour of the current item to RED
SetColor(here(), CIC_ITEM, 0x2020c0)
# Print the colours just set
print "%x" % GetColor(here(), CIC_SEGM)
print "%x" % GetColor(here(), CIC_FUNC)
print "%x" % GetColor(here(), CIC_ITEM)
Python>help(SetColor)
Help on function SetColor in module idc_bc695:
SetColor(ea, what, color)
SetColor(here(), CIC_ITEM, 0xc02020)
SetColor(here(), CIC_SEGM,0x208020)
SetColor(here(), CIC_FUNC,0x2020c0)
Python>SetColor(here(), 4, 0xc02020)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "E:\ida7\IDA 7.0\python\idc_bc695.py", line 418, in SetColor
def SetColor(ea, what, color): return set_color(ea, what, color)
File "E:\ida7\IDA 7.0\python\idc.py", line 8199, in set_color
raise ValueError, "'what' must be one of CIC_ITEM, CIC_FUNC and CIC_SEGM"
ValueError: 'what' must be one of CIC_ITEM, CIC_FUNC and CIC_SEGM