Пример #1
0
    def __init__( self, title, chooser ):

        self.chooser = chooser
        template_instance = PLUGIN_CHOOSER_FORM_TEMPLATE % title
        Form.__init__(self, template_instance, {
            'Chooser' : Form.EmbeddedChooserControl(chooser)
        })
Пример #2
0
	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()
Пример #3
0
    def __init__(self, crawled_apis, from_addr=0, to_addr=0):
        self.invert = False
        self.chosenApis = []
        self.apiChooser = ApiChooser("Apis", crawled_apis, flags=Choose.CH_MULTI)
        Form.__init__(self, r"""STARTITEM {id:rNormal}
BUTTON YES* Annotate
BUTTON CANCEL Cancel
IDA ApiScout (Results)

{FormChangeCb}
ApiScout has found the following APIs (select to annotate, e.g. CTRL+A):

<APIs:{cApiChooser}>
{cApiInfo}

Filter APIs by Range -  
<##from  :{iAddrFrom}>
<##to    :{iAddrTo}>
Filter APIs by Grouping - require another API 
<##within:{iByteRange}> bytes
<##Apply Filter:{bApplyFilter}>
""", {
    'cApiInfo': Form.StringLabel("APIs (unfiltered)"),
    'bApplyFilter': Form.ButtonInput(self.OnButtonApplyFilter),
    'iAddrFrom': Form.NumericInput(tp=Form.FT_ADDR, value=from_addr),
    'iAddrTo': Form.NumericInput(tp=Form.FT_ADDR, value=to_addr),
    'iByteRange': Form.NumericInput(tp=Form.FT_UINT64, value=0x100),
    'cGroup1': Form.ChkGroupControl(("rFilter", "rNormal")),
    'FormChangeCb': Form.FormChangeCb(self.OnFormChange),
    'cApiChooser' : Form.EmbeddedChooserControl(self.apiChooser)
})
Пример #4
0
 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),
                   })
Пример #5
0
    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),
        })
Пример #6
0
 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),
                })
Пример #7
0
    def __init__(self):
        Form.__init__(
            self, r"""STARTITEM 0
BUTTON YES* Save Settings
BUTTON CANCEL Cancel
Form Setup View

Debbuging:
<##Maximal function calls:   {iMaxFuncCall}>
<##Maximal dereference depth:{iDerefDepth}>


Debug Values:
<Raw:{rRaw}>
<Parse:{rParse}>
<Array:{rArray}>
<Containers:{rContainer}>
<Dereference:{rDeref}>
<Arguments:{rArgs}>{cDebugValues}>

""", {
                'cDebugValues':
                Form.ChkGroupControl(("rRaw", "rParse", "rArray", "rContainer",
                                      "rDeref", "rArgs")),
                'iMaxFuncCall':
                Form.NumericInput(tp=Form.FT_DEC),
                'iDerefDepth':
                Form.NumericInput(tp=Form.FT_DEC),
            })
Пример #8
0
        def activate(self, ctx):
            if regFu.isHighlightedEffective():
                addr = regFu.getOffset()
                simicsString = gdbProt.Evalx('SendGDBMonitor("@cgc.getMemoryValue(0x%x)");' % addr) 
                print('effective addr 0x%x value %s' % (addr, simicsString))
                value = getHex(simicsString)
            else:
                highlighted = idaapi.get_highlighted_identifier()
                addr = getHex(highlighted)
                if addr is None:
                    print('ModMemoryHandler unable to parse hex from %s' % highlighted)
                    return
                simicsString = gdbProt.Evalx('SendGDBMonitor("@cgc.getMemoryValue(0x%x)");' % addr) 
                print('addr 0x%x value %s' % (addr, simicsString))
                value = getHex(simicsString)

            # Sample form from kernwin.hpp
            s = """Modify memory
            Address: %$
            <~E~nter value:S:32:16::>
            """
            num = Form.NumericArgument('N', value=value)
            ok = idaapi.AskUsingForm(s,
                    Form.NumericArgument('$', addr).arg,
                    num.arg)
            if ok == 1:
                print("You entered: %x" % num.value)
                simicsString = gdbProt.Evalx('SendGDBMonitor("@cgc.writeWord(0x%x, 0x%x)");' % (addr, num.value)) 
                time.sleep(1)
                idc.RefreshDebuggerMemory()
Пример #9
0
 def __init__(self, names, packageName):
     idx = 0
     if packageName and packageName in names:
         idx = names.index(packageName)
     Form.__init__(
         self, ("STARTITEM 0\n"
                "BUTTON YES* Attach\n"
                "BUTTON CANCEL Cancel\n"
                "Attach android application\n"
                "\n"
                "<##   Package Name:{names}>\n"
                "<## IDA Debug Port:{idaDebugPort}>\n"
                "Launch Options"
                " <Debug Mode:{debug}>{launchOptions}>\n"
                "\n"), {
                    'names':
                    Form.DropdownListControl(
                        items=names, readonly=True, selval=idx),
                    'idaDebugPort':
                    Form.NumericInput(tp=Form.FT_DEC),
                    "launchOptions":
                    Form.ChkGroupControl(["debug"])
                })
     self.pns = names
     self.pn = packageName
Пример #10
0
    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),
            },
        )
    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()
Пример #12
0
    def __init__(self):
        """
        Arguments:
        Return Value:
        Description:
            -
        TODO:
            - Doc String
        """
        self.invert = False
        self.EChooser = TestEmbeddedChooserClass("E1", flags=Choose2.CH_MULTI)
        Form.__init__(self, r"""STARTITEM {id:rDiscardLazySolves}
Options
<Discard LAZY_SOLVES:{rDiscardLazySolves}>
<Immutable:{rImmutable}>
<Auto Load Libs:{rAutoLoadLibs}>{cGroup1}>

Symbolic stdin
<##Enter length of stdin:{iStdinLen}>
<Ending newline:{rNewline}>
<Allow Null:{rNull}>
<White Space:{rWhite}>
<Force ASCII:{rASCII}>{cGroup2}>
""", {
    'cGroup1': Form.ChkGroupControl(("rDiscardLazySolves", "rImmutable", "rAutoLoadLibs")),
    'iStdinLen':Form.NumericInput(),
    'cGroup2': Form.ChkGroupControl(("rNewline", "rNull", "rWhite", "rASCII"))
    })
Пример #13
0
    def __init__(self):
        self.invert = False
        self.EChooser = EmbeddedChooserClass("Title", flags=Choose.CH_MODAL)
        self.selected_id = 0
        self.s = ""
        self.fst = FuzzySearchThread()
        self.fst.refresh_list.connect(self.refresh_list)
        self.fst.finished.connect(self.finished)
        # self.EChooser = EmbeddedChooserClass("Title", flags=Choose.CH_CAN_REFRESH)

        # Portability fix from Python2 to Python3.
        try:
            self.cEChooser = super(
            ).cEChooser  #super() will raise exception in python2
        except:
            pass

        Form.__init__(
            self, r"""STARTITEM 
        IDA Fuzzy Search
        {FormChangeCb}
        <:{iStr1}>

        <Results:{cEChooser}>
""", {
                'iStr1': Form.StringInput(),
                'cEChooser': Form.EmbeddedChooserControl(self.EChooser),
                'FormChangeCb': Form.FormChangeCb(self.OnFormChange),
            })
Пример #14
0
 def __init__(self, title, values, idx=0):
     Form.__init__(self, ("STARTITEM 0\n"
                          "BUTTON YES* OK\n"
                          "BUTTON CANCEL Cancel\n" + title + "\n"
                                                             "\n"
                                                             "<Please select :{values}>\n"),
                   {"values": Form.DropdownListControl(items=values, readonly=True, selval=0)})
     self.cvs = values
Пример #15
0
 def __init__(self, title, labels, values=None, cancel="Cancel", index=0):
     Form.__init__(self, ("STARTITEM 0\n"
                          "BUTTON YES* OK\n"
                          "BUTTON CANCEL " + cancel + "\n" + title + "\n"
                                                             "\n"
                                                             "<Please select :{values}>\n"),
                   {"values": Form.DropdownListControl(items=labels, readonly=True, selval=index)})
     self.labels = labels
     self.cvs = values if values is not None else labels
Пример #16
0
    def __init__(self):
        self.invert = False
        Form.__init__(
            self,
            r"""STARTITEM {id:cGoVers}
GoLoader

{FormChangeCb}
<##Try to detemine go version based on moduledata:{iButton1}>
<##Try to detemine go version based on version string:{iButton2}>
<##Rename functions:{iButton3}>
Go version:
<Go1.2:{r2}>
<Go1.4:{r4}>
<Go1.5:{r5}>
<Go1.6:{r6}>
<Go1.7:{r7}>
<Go1.8:{r8}>
<Go1.9:{r9}>
<Go1.10:{r10}>{cGoVers}>
<##Add standard go types:{iButton4}>
<##Parse types by moduledata:{iButton5}>
""",
            {
                "iButton1": Form.ButtonInput(self.OnButton1),
                "iButton2": Form.ButtonInput(self.OnButton2),
                "iButton3": Form.ButtonInput(self.OnButton3),
                "iButton4": Form.ButtonInput(self.OnButton4),
                "iButton5": Form.ButtonInput(self.OnButton5),
                "cGoVers": Form.RadGroupControl(("r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10")),
                "FormChangeCb": Form.FormChangeCb(self.OnFormChange),
            },
        )
Пример #17
0
    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()
Пример #18
0
    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),
                'impFile':
                Form.FileInput(swidth=50, open=True),
                'FormChangeCb':
                Form.FormChangeCb(self.OnFormChange),
            })

        self.Compile()
Пример #19
0
    def __init__(self, manager, disable_param=False):

        self.disable_param = disable_param

        self.all_funcs = IDAUtils.get_all_ida_funcs()
        self.funcList = FunctionListView("asm",
                                         flags=Choose.CH_MULTI,
                                         all_funcs=self.all_funcs)
        self.selected_funcs = []

        self.configuration = manager.configuration
        apps = self.configuration['apps'].keys()
        default_app = self.configuration['default-app']
        if self.configuration['default-app'] is not None:
            default_index = apps.index(default_app)
        else:
            default_index = 0
        self.selected_app_key = default_app

        self.threshold = self.configuration['default-threshold']
        self.topk = self.configuration['default-topk']
        self.avoidSameBinary = self.configuration['default-avoidSameBinary']

        Form.__init__(
            self, r"""BUTTON YES* Continue
BUTTON CANCEL Cancel
Kam1n0
{FormChangeCb}
Select Function:
<(Use ctrl/shift + click to select multiple functions):{fvChooser}>
<Select all functions:{chkSearchAll}><Skip library functions:{chkSkipLib}>{adSearchGroup}>
Configuration
<Threshold:{txtSim}>
<TopK     :{txtTopK}>
<Avoid Same Binary  :{chkSameBin}>{chkGroup}>
<App   :{dpServer}>
""", {
                'adSearchGroup':
                Form.ChkGroupControl(["chkSearchAll", "chkSkipLib"]),
                'FormChangeCb':
                Form.FormChangeCb(self.OnFormChange),
                'txtSim':
                Form.StringInput(
                    swidth=25, tp=Form.FT_ASCII, value=str(self.threshold)),
                'txtTopK':
                Form.StringInput(
                    swidth=25, tp=Form.FT_ASCII, value=str(self.topk)),
                'chkGroup':
                Form.ChkGroupControl(("chkSameBin", "")),
                'dpServer':
                Form.DropdownListControl(swidth=45,
                                         width=45,
                                         selval=default_index,
                                         items=apps,
                                         readonly=True),
                'fvChooser':
                Form.EmbeddedChooserControl(self.funcList)
            })
        self.Compile()
Пример #20
0
    def __init__(self):
        Form.__init__(self, r"""STARTITEM {id:filePath}
BUTTON YES* Load
BUTTON CANCEL Cancel
Load Module
Choose module binary to be added to IDA database.
Note that depends on module size this may take a while.
<#Select a file to open#:{filePath}>
""", {
        'filePath': Form.FileInput(swidth=50, open=True),
        })
Пример #21
0
    def __init__(self):
        Form.__init__(self, r"""STARTITEM 0
BUTTON YES* Yeah
BUTTON NO Nope
BUTTON CANCEL NONE
Form Test

{FormChangeCb}
<Multilinetext:{txtMultiLineText}>
""", {
            'txtMultiLineText': Form.MultiLineTextControl(text="Hello"),
            'FormChangeCb': Form.FormChangeCb(self.OnFormChange),
        })
Пример #22
0
    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()
Пример #23
0
	def __init__(self, project_list):
		self.invert = False
		project_list += ["Select public project"]
		self._project_list = project_list
		Form.__init__(self, r"""STARTITEM {id:iProject}
BUTTON CANCEL Cancel
Project selector form
{FormChangeCb}
<##Select your working project:{iProject}>
""", {
			'FormChangeCb': Form.FormChangeCb(self.OnFormChange),
			'iProject': Form.DropdownListControl(project_list)
		})
Пример #24
0
    def __init__(self):
        Form.__init__(
            self, r"""STARTITEM {id:log_addr}
BUTTON YES* Enter
BUTTON CANCEL Cancel
Rename Function by log
Log func address and new function name in located .
<##Address\::{log_addr}>
<##Index\::{new_name}>
""", {
                'log_addr': Form.NumericInput(swidth=20, tp=Form.FT_HEX),
                'new_name': Form.NumericInput(swidth=20, tp=Form.FT_DEC),
            })
Пример #25
0
    def __init__(self):
        Form.__init__(self, r"""STARTITEM 0
BUTTON YES* Yeah
BUTTON NO Nope
BUTTON CANCEL NONE
Form Test

{FormChangeCb}
<Multilinetext:{txtMultiLineText}>
""", {
            'txtMultiLineText': Form.MultiLineTextControl(text="Hello"),
            'FormChangeCb': Form.FormChangeCb(self.OnFormChange),
        })
    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),
    })
Пример #27
0
    def __init__(self, start_ea, end_ea, org_file, bkp_file):
        Form.__init__(
            self, r"""Apply patches to input file

{FormChangeCb}
<##Start EA   :{intStartEA}>
<##End EA     :{intEndEA}>
<##Input file :{orgFile}>
<##Backup file:{bkpFile}>

<##Create backup:{rBackup}>
<##Restore original bytes:{rRestore}>{cGroup1}>
""", {
                'intStartEA':
                Form.NumericInput(swidth=40, tp=Form.FT_ADDR, value=start_ea),
                'intEndEA':
                Form.NumericInput(swidth=40, tp=Form.FT_ADDR, value=end_ea),
                'orgFile':
                Form.FileInput(swidth=50, open=True, value=org_file),
                'bkpFile':
                Form.FileInput(swidth=50, open=True, value=bkp_file),
                'cGroup1':
                Form.ChkGroupControl(("rBackup", "rRestore")),
                'FormChangeCb':
                Form.FormChangeCb(self.OnFormChange),
            })

        self.Compile()
Пример #28
0
    def __init__(self):
        Form.__init__(self, r"""STARTITEM {id:host}
BUTTON YES* Save
BUTTON CANCEL Cancel
FridaLink Settings

<##Host\::{host}> <##Port\::{port}>

<##CPU context columns\::{cpuctx_cols}>
""", {
        'host': Form.StringInput(swidth=15),
        'port': Form.NumericInput(swidth=5, tp=Form.FT_DEC),
        'cpuctx_cols': Form.NumericInput(swidth=5, tp=Form.FT_DEC)
        })
Пример #29
0
    def __init__(self):
        Form.__init__(
            self, r"""STARTITEM {id:mem_addr}
BUTTON YES* Add
BUTTON CANCEL Cancel
Add Memory Range
Specify start address and size of new memory range.
<##Address\::{mem_addr}> <##Size\::{mem_size}>
<##Comment\::{mem_cmnt}>
""", {
                'mem_addr': Form.NumericInput(swidth=20, tp=Form.FT_HEX),
                'mem_size': Form.NumericInput(swidth=10, tp=Form.FT_DEC),
                'mem_cmnt': Form.StringInput(swidth=41)
            })
Пример #30
0
    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()
Пример #31
0
    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),
            })
    def __init__(self, manager, message="Search Configuration:"):
        self.cnn = manager.connector
        Form.__init__(
            self, r"""BUTTON YES* Apply
BUTTON CANCEL Cancel
Kam1n0
{FormChangeCb}
%s
<Protocol :{txtProtocol}>
<Server   :{txtServer}>
<Port     :{txtPort}>
Login Info:
<User     :{txtUser}>
<Password :{txtPw}>
<  >
""" % message, {
                'FormChangeCb':
                Form.FormChangeCb(self.OnFormChange),
                'txtServer':
                Form.StringInput(
                    swidth=30, tp=Form.FT_ASCII, value=self.cnn.server),
                'txtProtocol':
                Form.StringInput(
                    swidth=30, tp=Form.FT_ASCII, value=self.cnn.protocol),
                'txtPort':
                Form.StringInput(
                    swidth=30, tp=Form.FT_ASCII, value=self.cnn.port),
                'txtUser':
                Form.StringInput(
                    swidth=30, tp=Form.FT_ASCII, value=self.cnn.un),
                'txtPw':
                Form.StringInput(
                    swidth=30, tp=Form.FT_ASCII, value=self.cnn.pw),
            })
        self.Compile()
Пример #33
0
    def __init__(self, db_list):
        Form.__init__(self, r"""STARTITEM {id:db_id}
BUTTON YES* Close
BUTTON CANCEL Cancel
Close DB

<##DB ID\::{db_id}>
""", {
        'db_id': Form.DropdownListControl(
                        items=db_list,
                        readonly=True,
                        selval=0,
                        swidth=20,
                        width=20),
        })
    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),
        'strPatch': Form.StringInput(tp=None, width=1024, swidth=40, hlp=None, value=patch_str, size=None),
        })

        self.Compile()
Пример #35
0
    def __init__(self, start_ea, end_ea, fill_value):

        Form.__init__(self,
r"""BUTTON YES* Fill
Fill bytes
<##Start EA   :{intStartEA}>
<##End EA     :{intEndEA}>
<##Value      :{intPatch}>
""", {
        'intStartEA': Form.NumericInput(swidth=40,tp=Form.FT_ADDR,value=start_ea),
        'intEndEA': Form.NumericInput(swidth=40,tp=Form.FT_ADDR,value=end_ea),
        'intPatch': Form.NumericInput(swidth=40,tp=Form.FT_HEX,value=fill_value),
        })

        self.Compile()
Пример #36
0
    def __init__(self, addr_str, fpos_str, patch_str, org_str):
        Form.__init__(self, 
r"""BUTTON YES* Restore
BUTTON CANCEL Cancel
Restore patch bytes
Address        {strAddr}
File offset    {strFpos}
<:{strOrg}>
""", {
        'strAddr': Form.StringLabel(addr_str),
        'strFpos': Form.StringLabel(fpos_str),
        'strOrg': Form.MultiLineTextControl(text=org_str, flags = Form.MultiLineTextControl.TXTF_FIXEDFONT | Form.MultiLineTextControl.TXTF_READONLY),

        })

        self.Compile()
Пример #37
0
	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()
    def __init__(self, addr_str, fpos_str, patch_str, org_str):
        Form.__init__(self, 
r"""BUTTON YES* Restore
BUTTON CANCEL Cancel
Restore patch bytes (Please don't edit)

Address        {strAddr}
File offset    {strFpos}
<:{strOrg}>
""", {
        'strAddr': Form.StringLabel(addr_str),
        'strFpos': Form.StringLabel(fpos_str),
        #'strOrg': Form.MultiLineTextControl(text=org_str, flags = Form.MultiLineTextControl.TXTF_FIXEDFONT | Form.MultiLineTextControl.TXTF_READONLY),
        'strOrg': Form.StringInput(tp=None, width=1024, swidth=40, hlp=None, value=org_str, size=None),
        })
        self.Compile()
    def __init__(self):
        Form.__init__(
            self, r"""BUTTON YES* Select
Select Encoding

{FormChangeCb}
<Select an encoding :{cbReadonly}>
""", {
                'cbReadonly':
                Form.DropdownListControl(
                    items=ENCODING_LIST, readonly=True, selval=19),
                'FormChangeCb':
                Form.FormChangeCb(self.OnFormChange)
            })

        self.Compile()
    def __init__(self, start_ea, end_ea, fill_value):

        Form.__init__(self,
r"""BUTTON YES* Fill
Fill bytes

<##Start EA   :{intStartEA}>
<##End EA     :{intEndEA}>
<##Value      :{intPatch}>
""", {
        'intStartEA': Form.NumericInput(swidth=40,tp=Form.FT_ADDR,value=start_ea),
        'intEndEA': Form.NumericInput(swidth=40,tp=Form.FT_ADDR,value=end_ea),
        'intPatch': Form.NumericInput(swidth=40,tp=Form.FT_HEX,value=fill_value),
        })

        self.Compile()
    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()
Пример #42
0
	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()
Пример #43
0
	def __init__(self,bundleFile,impFile):
		Form.__init__(self,
r"""BUTTON YES* 替换
BUTTON CANCEL 取消
请选择文件(文件压缩后数据大小必须小于替换前压缩后数据大小)

{FormChangeCb}
<##选择被打包的文件:{bundleFile}>
<##选择修改后的文件:{impFile}>

""".decode('utf-8').encode(sys.getfilesystemencoding()), {  'bundleFile': Form.FileInput(open=True,value=bundleFile),
		'impFile': Form.FileInput(open=True,value=impFile),

		'FormChangeCb': Form.FormChangeCb(self.OnFormChange),
		})

		self.Compile()
Пример #44
0
    def __init__(self, addr_str, fpos_str, patch_str, org_str):
        Form.__init__(self, 
r"""BUTTON YES* Restore
BUTTON CANCEL Cancel
Restore patch bytes

Address        {strAddr}
File offset    {strFpos}
<:{strOrg}>
""", {
        'strAddr': Form.StringLabel(addr_str),
        'strFpos': Form.StringLabel(fpos_str),
        'strOrg': Form.MultiLineTextControl(text=org_str, flags = Form.MultiLineTextControl.TXTF_FIXEDFONT | Form.MultiLineTextControl.TXTF_READONLY),

        })

        self.Compile()
Пример #45
0
    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()
    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()
Пример #47
0
 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),
                   })
Пример #48
0
	def __init__(self,manager):
		self.manager = manager
		self.conf = manager.get_config()
		self.changed = False
		Form.__init__(self, 
			"""Neo4IDA - Execute Cypher Query
			{form_change}
			<#Query#~Q~uery:{query}>
			<#Execute Query#~E~xecute:{executeButton}>
			"""
			, {
				"form_change": Form.FormChangeCb(self.form_change),
				"query":Form.StringInput(swidth=80),
				"executeButton":Form.ButtonInput(self.button_press)
			}
		)
		
		self.Compile()
		self.query.value = "START n=node(*) return n;"
		self.Execute()
Пример #49
0
 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),
     })
    def __init__(self, start_ea, end_ea, org_file, bkp_file):
        Form.__init__(self,
r"""Apply patches to input file

{FormChangeCb}
<##Start EA   :{intStartEA}>
<##End EA     :{intEndEA}>
<##Input file :{orgFile}>
<##Backup file:{bkpFile}>

<##Create backup:{rBackup}>
<##Restore original bytes:{rRestore}>{cGroup1}>
""", {
        'intStartEA': Form.NumericInput(swidth=40,tp=Form.FT_ADDR,value=start_ea),
        'intEndEA': Form.NumericInput(swidth=40,tp=Form.FT_ADDR,value=end_ea),
        'orgFile': Form.FileInput(swidth=50, open=True, value=org_file),
        'bkpFile': Form.FileInput(swidth=50, open=True, value=bkp_file),
        'cGroup1': Form.ChkGroupControl(("rBackup", "rRestore")),
        'FormChangeCb': Form.FormChangeCb(self.OnFormChange),
        })

        self.Compile()
    def __init__(self, manager, message = "Search Configuration:"):
        self.cnn = manager.connector
        Form.__init__(self,
r"""BUTTON YES* Apply
BUTTON CANCEL Cancel
Kam1n0
{FormChangeCb}
%s
<Protocol :{txtProtocol}>
<Server   :{txtServer}>
<Port     :{txtPort}>
Login Info:
<User     :{txtUser}>
<Password :{txtPw}>
<  >
""" % message, {
                          'FormChangeCb': Form.FormChangeCb(self.OnFormChange),
                          'txtServer': Form.StringInput(swidth=30,tp=Form.FT_ASCII, value=self.cnn.server),
                          'txtProtocol': Form.StringInput(swidth=30,tp=Form.FT_ASCII, value=self.cnn.protocol),
                          'txtPort': Form.StringInput(swidth=30,tp=Form.FT_ASCII, value=self.cnn.port),
                          'txtUser': Form.StringInput(swidth=30,tp=Form.FT_ASCII, value=self.cnn.un),
                          'txtPw': Form.StringInput(swidth=30,tp=Form.FT_ASCII, value=self.cnn.pw),
                      })
        self.Compile()
    def __init__(self, manager):
        global funcListG
        self.funcList = FunctionListView("asm", flags=Choose2.CH_MULTI)
        self.funcs = []

        self.cnn = manager.connector
        self.Kconf = manager.Kconf
        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* Search
BUTTON CANCEL Cancel
Kam1n0
{FormChangeCb}
Select function to be searched
<(Use ctrl/shift + click to select multiple functions):{fvChooser}>
<Select all functions:{chkSearchAll}><Skip library functions:{chkSkipLib}>{adSearchGroup}>
Search configuration
<Threshold:{txtSim}>
<Server   :{dpServer}>

""", {
                          'adSearchGroup': Form.ChkGroupControl(["chkSearchAll", "chkSkipLib"]),
                          'FormChangeCb': Form.FormChangeCb(self.OnFormChange),
                          'txtSim': Form.StringInput(swidth=25,tp=Form.FT_ASCII, value='0.5'),
                          'dpServer':Form.DropdownListControl(swidth=45, width=45, selval=defaultIndex, items=dpItems, readonly=True),
                          'fvChooser': Form.EmbeddedChooserControl(self.funcList)
                      })
        self.Compile()
Пример #53
0
    def __init__(self):
        self.invert = False
        self.EChooser = TestEmbeddedChooserClass("E1", flags=Choose2.CH_MULTI)
        Form.__init__(
            self,
            r"""STARTITEM {id:rNormal}
BUTTON YES* Yeah
BUTTON NO Nope
BUTTON CANCEL Nevermind
Form Test

{FormChangeCb}
This is a string: +{cStr1}+
This is an address: +{cAddr1}+

Escape\{control}
This is a string: '{cStr2}'
This is a number: {cVal1}

<#Hint1#Enter name:{iStr1}>
<#Hint2#Select color:{iColor1}>
Browse test
<#Select a file to open#Browse to open:{iFileOpen}>
<#Select a file to save#Browse to save:{iFileSave}>
<#Select dir#Browse for dir:{iDir}>
Type
<#Select type#Write a type:{iType}>
Numbers
<##Enter a selector value:{iSegment}>
<##Enter a raw hex:{iRawHex}>
<##Enter a character:{iChar}>
<##Enter an address:{iAddr}>
Button test
<##Button1:{iButton1}> <##Button2:{iButton2}>

Check boxes:
<Error output:{rError}>
<Normal output:{rNormal}>
<Warnings:{rWarnings}>{cGroup1}>

Radio boxes:
<Green:{rGreen}>
<Red:{rRed}>
<Blue:{rBlue}>{cGroup2}>
<Embedded chooser:{cEChooser}>
The end!
""",
            {
                "cStr1": Form.StringLabel("Hello"),
                "cStr2": Form.StringLabel("StringTest"),
                "cAddr1": Form.NumericLabel(0x401000, Form.FT_ADDR),
                "cVal1": Form.NumericLabel(99, Form.FT_HEX),
                "iStr1": Form.StringInput(),
                "iColor1": Form.ColorInput(),
                "iFileOpen": Form.FileInput(open=True),
                "iFileSave": Form.FileInput(save=True),
                "iDir": Form.DirInput(),
                "iType": Form.StringInput(tp=Form.FT_TYPE),
                "iSegment": Form.NumericInput(tp=Form.FT_SEG),
                "iRawHex": Form.NumericInput(tp=Form.FT_RAWHEX),
                "iAddr": Form.NumericInput(tp=Form.FT_ADDR),
                "iChar": Form.NumericInput(tp=Form.FT_CHAR),
                "iButton1": Form.ButtonInput(self.OnButton1),
                "iButton2": Form.ButtonInput(self.OnButton2),
                "cGroup1": Form.ChkGroupControl(("rNormal", "rError", "rWarnings")),
                "cGroup2": Form.RadGroupControl(("rRed", "rGreen", "rBlue")),
                "FormChangeCb": Form.FormChangeCb(self.OnFormChange),
                "cEChooser": Form.EmbeddedChooserControl(self.EChooser),
            },
        )
    def __init__(self, manager, disable_param=False):

        self.disable_param = disable_param

        self.all_funcs = IDAUtils.get_all_ida_funcs()
        self.funcList = FunctionListView("asm", flags=Choose.CH_MULTI,
                                         all_funcs=self.all_funcs)
        self.selected_funcs = []

        self.configuration = manager.configuration
        apps = self.configuration['apps'].keys()
        default_app = self.configuration['default-app']
        if self.configuration['default-app'] is not None:
            default_index = apps.index(default_app)
        else:
            default_index = 0
        self.selected_app_key = default_app

        self.threshold = self.configuration['default-threshold']
        self.topk = self.configuration['default-topk']
        self.avoidSameBinary = self.configuration['default-avoidSameBinary']

        Form.__init__(self,
r"""BUTTON YES* Continue
BUTTON CANCEL Cancel
Kam1n0
{FormChangeCb}
Select Function:
<(Use ctrl/shift + click to select multiple functions):{fvChooser}>
<Select all functions:{chkSearchAll}><Skip library functions:{chkSkipLib}>{adSearchGroup}>
Configuration
<Threshold:{txtSim}>
<TopK     :{txtTopK}>
<Avoid Same Binary  :{chkSameBin}>{chkGroup}>
<App   :{dpServer}>
""", {
                          'adSearchGroup': Form.ChkGroupControl(
                              ["chkSearchAll", "chkSkipLib"]),
                          'FormChangeCb': Form.FormChangeCb(
                              self.OnFormChange),
                          'txtSim': Form.StringInput(
                              swidth=25,
                              tp=Form.FT_ASCII,
                              value=str(
                                  self.threshold)),
                          'txtTopK': Form.StringInput(
                              swidth=25,
                              tp=Form.FT_ASCII,
                              value=str(self.topk)),
                          'chkGroup': Form.ChkGroupControl(
                              ("chkSameBin", "")),
                          'dpServer': Form.DropdownListControl(
                              swidth=45,
                              width=45,
                              selval=default_index,
                              items=apps,
                              readonly=True),
                          'fvChooser': Form.EmbeddedChooserControl(
                              self.funcList)
                      })
        self.Compile()