本文整理汇总了Python中idaapi.Form类的典型用法代码示例。如果您正苦于以下问题:Python Form类的具体用法?Python Form怎么用?Python Form使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Form类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, start_ea, end_ea):
Form.__init__(self,
r"""BUTTON YES* Import
Import data
{FormChangeCb}
<##Start EA :{intStartEA}>
<##End EA :{intEndEA}>
Import type: Patching options:
<hex string:{rHex}><##Trim to selection:{cSize}>{cGroup}>
<string literal:{rString}>
<binary file:{rFile}>{rGroup}>
<:{strPatch}>
<##Import BIN file:{impFile}>
""", {
'intStartEA': Form.NumericInput(swidth=40,tp=Form.FT_ADDR,value=start_ea),
'intEndEA': Form.NumericInput(swidth=40,tp=Form.FT_ADDR,value=end_ea),
'cGroup': Form.ChkGroupControl(("cSize",)),
'rGroup': Form.RadGroupControl(("rHex", "rString", "rFile")),
#'strPatch': Form.MultiLineTextControl(swidth=80, flags=Form.MultiLineTextControl.TXTF_FIXEDFONT),
'strPatch': Form.StringInput(tp=None, width=1024, swidth=40, hlp=None, value=None, size=None),
'impFile': Form.FileInput(swidth=50, open=True),
'FormChangeCb': Form.FormChangeCb(self.OnFormChange),
})
self.Compile()
示例2: __init__
def __init__(self, pomidor):
self.pomidor = pomidor
Form.__init__(self,
r"""BUTTON YES* NONE
BUTTON NO NONE
BUTTON CANCEL NONE
IDA Pomidor
{FormChangeCb}
{imgPomidor}
<Pomidor:{iButtonPomidor}> <Short Break:{iButtonShortBreak}> <Long Break:{iButtonLongBreak}>
{strTime}
<Pomidor Log:{cEChooser}>
""", {
'imgPomidor' : Form.StringLabel(""),
'FormChangeCb' : Form.FormChangeCb(self.OnFormChange),
'cEChooser' : Form.EmbeddedChooserControl(self.pomidor.pomidorView, swidth=50),
'strTime' : Form.StringLabel(""),
'iButtonPomidor' : Form.ButtonInput(self.OnButtonPomidor, swidth=16),
'iButtonShortBreak': Form.ButtonInput(self.OnButtonShortBreak, swidth=16),
'iButtonLongBreak' : Form.ButtonInput(self.OnButtonLongBreak, swidth=16),
})
self.Compile()
示例3: __init__
def __init__(self):
Form.__init__(self, ("STARTITEM 0\n"
"BUTTON YES* Save Settings\n"
"BUTTON CANCEL Cancel\n"
"Form Setup View\n"
"\n"
"Debbuging:\n"
"<##Maximal function calls:{iMaxFuncCall}>\n"
"<##Maximal dereference depth:{iDerefDepth}>\n"
"\n"
"\n"
"Debug Values:\n"
"<Step Into System Libraries:{rStepInSysLibs}>\n"
"<New Function Analysis:{rFuncAnalysis}>\n"
"<Add xrefs:{rAddXref}>\n"
"<Raw:{rRaw}>\n"
"<Parse:{rParse}>\n"
"<Array:{rArray}>\n"
"<Enum:{rEnum}>\n"
"<Containers:{rContainer}>\n"
"<Dereference:{rDeref}>\n"
"<Arguments:{rArgs}>{cDebugValues}>\n"
"\n"
), {
'cDebugValues': Form.ChkGroupControl(
("rStepInSysLibs", "rAddXref", "rFuncAnalysis", "rRaw", "rParse", "rArray", "rContainer",
"rDeref", "rArgs", "rEnum")),
'iMaxFuncCall': Form.NumericInput(tp=Form.FT_DEC),
'iDerefDepth': Form.NumericInput(tp=Form.FT_DEC),
})
示例4: __init__
def __init__(self):
self.__n = 0
Form.__init__(self,
r"""BUTTON YES* Yeah
BUTTON NO Nope
BUTTON CANCEL NONE
Dropdown list test
{FormChangeCb}
<Dropdown list (readonly):{cbReadonly}> <Add element:{iButtonAddelement}> <Set index:{iButtonSetIndex}>
<Dropdown list (editable):{cbEditable}> <Set string:{iButtonSetString}>
""", {
'FormChangeCb': Form.FormChangeCb(self.OnFormChange),
'cbReadonly': Form.DropdownListControl(
items=["red", "green", "blue"],
readonly=True,
selval=1),
'cbEditable': Form.DropdownListControl(
items=["1MB", "2MB", "3MB", "4MB"],
readonly=False,
selval="4MB"),
'iButtonAddelement': Form.ButtonInput(self.OnButtonNop),
'iButtonSetIndex': Form.ButtonInput(self.OnButtonNop),
'iButtonSetString': Form.ButtonInput(self.OnButtonNop),
})
示例5: __init__
def __init__(self):
# Load custom icon
self.icon_id = idaapi.load_custom_icon(data=MyChooserForm.icon_data)
if self.icon_id == 0:
raise RuntimeError("Failed to load icon data!")
self.main_current_index = -1
self.EChMain = MainChooserClass("MainChooser", self.icon_id)
self.EChAux = AuxChooserClass("AuxChooser", self.icon_id)
# Link the form to the EChooser
self.EChMain.form = self
self.EChAux.form = self
Form.__init__(
self,
r"""STARTITEM 0
Form with choosers
{FormChangeCb}
Select an item in the main chooser:
<Main chooser:{ctrlMainChooser}><Auxiliar chooser (multi):{ctrlAuxChooser}>
<Selection:{ctrlSelectionEdit}>
""",
{
"ctrlSelectionEdit": Form.StringInput(),
"FormChangeCb": Form.FormChangeCb(self.OnFormChange),
"ctrlMainChooser": Form.EmbeddedChooserControl(self.EChMain),
"ctrlAuxChooser": Form.EmbeddedChooserControl(self.EChAux),
},
)
示例6: __init__
def __init__(self,manager):
self.manager = manager
self.conf = manager.get_config()
self.changed = False
Form.__init__(self,
"""Neo4IDA - Manage Neo4j Connection
{form_change}
<#Host#~H~ost:{host}> <#Port#~P~ort:{port}>
<#Username#~U~sername:{username}>
<#Password#~P~assword:{password}>
"""
, {
"form_change": Form.FormChangeCb(self.form_change),
"host":Form.StringInput(swidth=20),
"port":Form.StringInput(swidth=10),
"username":Form.StringInput(swidth=40),
"password":Form.StringInput(swidth=40)
}
)
self.Compile()
self.host.value = self.conf["host"]
self.port.value = self.conf["port"]
self.username.value = self.conf["username"]
self.password.value = self.conf["password"]
self.Execute()
示例7: __init__
def __init__(self):
self.invert = False
Form.__init__(self, r"""STARTITEM {id:host}
FCatalog Client Configuration
<#Host:{host}>
<#Port:{port}>
<#Database Name:{db_name}>
""", {
'host': Form.StringInput(tp=Form.FT_TYPE),
'port': Form.StringInput(tp=Form.FT_TYPE),
'db_name': Form.StringInput(tp=Form.FT_TYPE),
})
示例8: __init__
def __init__(self, addr_str, fpos_str, patch_str, org_str):
Form.__init__(self,
r"""Edit patch bytes
Address {strAddr}
File offset {strFpos}
<:{strPatch}>
""", {
'strAddr': Form.StringLabel(addr_str),
'strFpos': Form.StringLabel(fpos_str),
'strPatch': Form.MultiLineTextControl(text=patch_str, flags = Form.MultiLineTextControl.TXTF_FIXEDFONT),
})
self.Compile()
示例9: __init__
def __init__(self, cnn, funcs):
self.cnn = cnn
self.actionView = ActionView(form=self, funcs=funcs, embedded=True)
self.initialized = False
Form.__init__(self,
r"""BUTTON YES* OK
BUTTON NO NONE
BUTTON CANCEL NONE
Indexing job
{FormChangeCb}
<Index progress:{cEChooser}>
""", {
'FormChangeCb': Form.FormChangeCb(self.OnFormChange),
'cEChooser': Form.EmbeddedChooserControl(self.actionView, swidth=0),
})
self.Compile()
示例10: __init__
def __init__(self,defaultpath):
Form.__init__(self,
r"""BUTTON YES* 保存
BUTTON CANCEL 取消
请选择输出目录
{FormChangeCb}
<##输出目录:{impFile}>
""", {
'impFile': Form.DirInput(value=defaultpath),
'FormChangeCb': Form.FormChangeCb(self.OnFormChange),
})
self.Compile()
示例11: __init__
def __init__(self,defaultpath):
Form.__init__(self,
r"""BUTTON YES* 保存
BUTTON CANCEL 取消
请选择输出目录
{FormChangeCb}
<##输出目录:{impFile}>
""".decode('utf-8').encode(sys.getfilesystemencoding()), {
'impFile': Form.DirInput(value=defaultpath),
'FormChangeCb': Form.FormChangeCb(self.OnFormChange),
})
self.Compile()
示例12: __init__
def __init__(self, heaptracer):
self.heaptracer = heaptracer
Form.__init__(self,
r"""Heap Tracer
{FormChangeCb}
Pin path <##:{strPinPath}>
Executable path<##:{strExecPath}>
<Host:{strHost}>{spacer}<Port:{intPort}>
""", {
'spacer' : Form.StringLabel(" "),
'strPinPath' : Form.StringInput(swidth=35,tp=Form.FT_ASCII),
'strExecPath' : Form.StringInput(swidth=35,tp=Form.FT_ASCII),
'FormChangeCb' : Form.FormChangeCb(self.OnFormChange),
'strHost' : Form.StringInput(swidth=25,tp=Form.FT_ASCII),
'intPort' : Form.NumericInput(swidth=10,tp=Form.FT_DEC),
})
self.Compile()
示例13: __init__
def __init__(self, manager):
self.cnn = manager.connector
self.Kconf = manager.Kconf
self.listView = ConnectionListView(manager)
dpItems = self.Kconf['cnns'].keys()
if self.Kconf['default-cnn'] is not None:
defaultIndex = self.Kconf['cnns'].keys().index(
self.Kconf['default-cnn']
)
else:
defaultIndex = 0
Form.__init__(self,
r"""BUTTON YES* OK
BUTTON CANCEL NONE
Kam1n0 - Manage connections
{FormChangeCb}
Manage Connections:
<(Click to edit):{fvChooser}>
<Remove :{btnRemove}> Remove selected connection.
<Protocol :{txtProtocol}>
<Server :{txtServer}>
<Port :{txtPort}>
Login Info:
<User :{txtUser}>
<Password :{txtPw}>
<Update / Add:{btnUpdate}>
<Default :{dpCnn}>
< >
""" , {
'fvChooser': Form.EmbeddedChooserControl(self.listView),
'FormChangeCb': Form.FormChangeCb(self.OnFormChange),
'txtServer': Form.StringInput(swidth=30,tp=Form.FT_ASCII),
'txtProtocol': Form.StringInput(swidth=30,tp=Form.FT_ASCII),
'txtPort': Form.StringInput(swidth=30,tp=Form.FT_ASCII),
'txtUser': Form.StringInput(swidth=30,tp=Form.FT_ASCII),
'txtPw': Form.StringInput(swidth=30,tp=Form.FT_ASCII),
'btnRemove' : Form.ButtonInput(self.OnButtonRemove),
'btnUpdate' : Form.ButtonInput(self.OnButtonUpdate),
'dpCnn' : Form.DropdownListControl(swidth=45, width=45, selval=defaultIndex, items=dpItems, readonly=True)
})
self.Compile()
示例14: __init__
def __init__(self):
Form.__init__(self, ("STARTITEM 0\n"
"BUTTON YES* Confirm\n"
"BUTTON CANCEL Cancel\n"
"VMAttack Settings\n"
"\n"
"VM Values:\n"
"<Byte code start :{iCodeStart}>\n"
"<Byte code end :{iCodeEnd}>\n"
"<Jump table base address :{iBaseAddr}>\n"
"<VM function address :{iVMAddr}>\n"
"\n"
"Clustering:\n"
"<Show basic blocks:{rShowBB}>\n"
"<Greedy clustering:{rGreedyCluster}>{cClusterValues}>\n"
"<Cluster Heuristic :{iClusterHeu}>\n"
"\n"
"Grading Automation:\n"
"<Input/Output Importance :{iInOut}>\n"
"<Clustering Importance :{iClu}>\n"
"<Pattern Importance :{iPaMa}>\n"
"<Memory Usage Importance :{iMeUs}>\n"
"<Static Analysis Importance:{iSta}>\n"
"\n"
"\n"
"Dynamic Analysis:\n"
"<Step Into System Libraries :{rStepInSysLibs}>\n"
'<Extract function parameters:{rFuncParams}>{cDynamicValues}>\n'
), {
'cClusterValues': Form.ChkGroupControl(("rShowBB", "rGreedyCluster")),
'cDynamicValues': Form.ChkGroupControl(('rStepInSysLibs', 'rFuncParams')),
'iClusterHeu': Form.NumericInput(tp=Form.FT_DEC),
'iInOut': Form.NumericInput(tp=Form.FT_DEC),
'iClu': Form.NumericInput(tp=Form.FT_DEC),
'iPaMa': Form.NumericInput(tp=Form.FT_DEC),
'iMeUs': Form.NumericInput(tp=Form.FT_DEC),
'iSta': Form.NumericInput(tp=Form.FT_DEC),
'iVMAddr': Form.NumericInput(tp=Form.FT_DEC),
'iBaseAddr': Form.NumericInput(tp=Form.FT_DEC),
'iCodeEnd': Form.NumericInput(tp=Form.FT_DEC),
'iCodeStart': Form.NumericInput(tp=Form.FT_DEC),
})
示例15: __init__
def __init__(self, functions):
self.functions = functions
Form.__init__(self, ("STARTITEM 0\n"
"BUTTON YES* StartDIE\n"
"BUTTON CANCEL Cancel\n"
"Form Scope Chooser\n"
"\n"
"<Start Function :{cbStartFunction}>\n"
"<End Function :{cbEndFunction}>\n"
), {
'iStartAddr' : Form.NumericInput(tp=Form.FT_ADDR),
'iEndAddr' : Form.NumericInput(tp=Form.FT_ADDR),
'cbStartFunction': Form.DropdownListControl(
items=self.functions,
readonly=True,
selval=1),
'cbEndFunction': Form.DropdownListControl(
items=self.functions,
readonly=True,
selval=1),
})