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, 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()
    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()
    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

        self.threshold = self.Kconf['default-threshold']
        self.topk = self.Kconf['default-topk']

        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}>
<TopK     :{txtTopK}>
<Server   :{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)),
                'dpServer':
                Form.DropdownListControl(swidth=45,
                                         width=45,
                                         selval=defaultIndex,
                                         items=dpItems,
                                         readonly=True),
                'fvChooser':
                Form.EmbeddedChooserControl(self.funcList)
            })
        self.Compile()
Esempio n. 5
0
    def __init__(self):
        self.invert = False
        Form.__init__(
            self, r"""STARTITEM {id:host}
FCatalog Client Configuration

<#Host:{host}>
<#Port:{port}>
<#Database Name:{db_name}>
<#Exclude Pattern:{exclude_pattern}>
""", {
                'host': Form.StringInput(tp=Form.FT_TYPE),
                'port': Form.StringInput(tp=Form.FT_TYPE),
                'db_name': Form.StringInput(tp=Form.FT_TYPE),
                'exclude_pattern': Form.StringInput(tp=Form.FT_TYPE),
            })
Esempio n. 6
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),
            })
Esempio n. 7
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),
            })
Esempio n. 8
0
  def __init__(self):
    s = r"""Pigaios
  Please select the path to the exported source code SQLite database to diff against the current
  binary database.

  <#Select an exported source code SQLite database                                           #Database           :{iFileOpen}>
  <#Enter the command line for indenting sources and pseudo-codes (leave blank to ignore it) #Indent command     :{iIndentCommand}>
  <#Minimum ratio to consider a match good enough (set to zero to automatically calculate it)#Calculations ratio :{iMinLevel}>
  <#Minimum ratio for a match to be displayed (set to zero to automatically calculate it)    #Display ratio      :{iMinDisplayLevel}>
   <Use the decompiler if available:{rUseDecompiler}>{cGroup1}>"""
    args = {'iFileOpen'       : Form.FileInput(open=True, swidth=45),
            'iIndentCommand'  : Form.StringInput(swidth=45),
            'iMinLevel'       : Form.StringInput(swidth=10),
            'iMinDisplayLevel': Form.StringInput(swidth=10),
            'cGroup1'  : Form.ChkGroupControl(("rUseDecompiler",))
            }
    Form.__init__(self, s, args)
Esempio n. 9
0
    def __init__(self):
        self.invert = False
        Form.__init__(
            self, r"""STARTITEM {id:iUserName}
BUTTON YES* Login
BUTTON CANCEL Cancel
Login form
{FormChangeCb}
<##Enter your username:{iUserName}>
<##Enter your password:{iPassword}>
{iResult}
""", {
                'FormChangeCb': Form.FormChangeCb(self.OnFormChange),
                'iUserName': Form.StringInput(tp=Form.FT_ASCII),
                'iPassword': Form.StringInput(tp=Form.FT_ASCII),
                "iResult": Form.StringLabel(
                    tp=Form.FT_ASCII, value="", sz=1024)
            })
Esempio n. 10
0
    def __init__(self, module, address, symbol, recent):
        Form.__init__(
            self, r"""STARTITEM {id:ret_type}
BUTTON YES* Save
BUTTON CANCEL Cancel
Function Implementation Replace

{segment}  {address}:  {symbol} 

<##return type\::{ret_type}>   <##arguments\::{args}>

{orig_call}
Recent source file:{src_file}
<##Script source code\::{script}>
<##Load from file:{loadfile}><##Update from file:{update}>
""", {
                'segment':
                Form.StringLabel("[" + module + "]", tp='F'),
                'address':
                Form.StringLabel(address, tp='A'),
                'symbol':
                Form.StringLabel(symbol, tp='X'),
                'ret_type':
                Form.StringInput(swidth=10),
                'args':
                Form.StringInput(swidth=40),
                'orig_call':
                Form.StringLabel(
                    "NOTE: Original implementation can be called using `frlOriginalImpl()`"
                ),
                'src_file':
                Form.StringLabel(recent if recent is not None else "", tp='f'),
                'script':
                Form.MultiLineTextControl(flags=self.textFlags,
                                          tabsize=self.textTab,
                                          width=200,
                                          swidth=200),
                'loadfile':
                Form.ButtonInput(self.onLoadScript),
                'update':
                Form.ButtonInput(self.onUpdateScript),
            })
        self.recentScriptFile = recent
Esempio n. 11
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)
            })
Esempio n. 12
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)
        })
Esempio n. 13
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()
    def __init__(self, manager):
        self.allFuncs = [GetFunction(x) for x in GetFunctions()]
        self.funcList = FunctionListView("asm",
                                         allFuncs=self.allFuncs,
                                         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* Index
BUTTON CANCEL Cancel
Kam1n0
{FormChangeCb}
Select Function to be indexed
<(Use ctrl/shift + click to select multiple functions):{fvChooser}>
<Select all functions:{chkSearchAll}>
<Select all library functions:{chkOnlyLib}>
<Select all but not library functions:{chkSkipLib}>{adSearchGroup}>
Index configuration
<Server   :{dpServer}>
""", {
                'adSearchGroup':
                Form.ChkGroupControl(
                    ["chkSearchAll", "chkSkipLib", "chkOnlyLib"]),
                '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()
        self.activated = False
Esempio n. 15
0
    def __init__(self):
        Form.__init__(
            self, r"""STARTITEM {id:iAddr}
BUTTON YES* OK
BUTTON CANCEL Cancel
Modify memory with a string

{FormChangeCb}
<#Hint1#Enter string  :{iStr1}>
<##Enter an address      :{iAddr}>

""", {
                'iStr1': Form.StringInput(),
                'iAddr': Form.NumericInput(tp=Form.FT_ADDR),
                'iButton1': Form.ButtonInput(self.OnButton1),
                'iButton2': Form.ButtonInput(self.OnButton2),
                'FormChangeCb': Form.FormChangeCb(self.OnFormChange),
            })
Esempio n. 16
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()
Esempio n. 17
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)
        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),
        })
Esempio n. 18
0
    def __init__(self):
        Form.__init__(
            self, r"""STARTITEM {id:db_id}
BUTTON YES* Save
BUTTON CANCEL Cancel
Create New DB

<##DB ID\:  :{db_id}>
<##DB File\::{db_path}>
<##First Table Query\::{db_table}>
""", {
                'db_id':
                Form.StringInput(swidth=15),
                'db_path':
                Form.FileInput(save=True),
                'db_table':
                Form.MultiLineTextControl(flags=self.textFlags,
                                          tabsize=self.textTab,
                                          width=200,
                                          swidth=200),
            })
Esempio n. 19
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)
            })
Esempio n. 20
0
    def __init__(self, modules, recentOnEnter, recentOnLeave):
        Form.__init__(
            self, r"""STARTITEM {id:module}
BUTTON YES* Save
BUTTON CANCEL Cancel
Arbitrary Hook

                        !!! MAKE SURE YOU KNOW WHAT YOU ARE DOING HERE !!!

<Module\: :{module}> <##Address\::{address}>
<##Comment\::{comment}>

<Instruction:{set_inst}><Function:{set_func}>{hook_type}><Once:{set_once}><Permanent:{set_perm}>{trigger}>

Recent onEnter script file:{src_file_enter}
<##onEnter script\::{script_enter}>
<##Load from file:{loadfile_enter}><##Update from file:{update_enter}>
Recent onLeave script file:{src_file_leave}
<##onLeave script\::{script_leave}>
<##Load from file:{loadfile_leave}><##Update from file:{update_leave}>
""", {
                'module':
                Form.DropdownListControl(items=modules,
                                         readonly=True,
                                         selval=0,
                                         swidth=20,
                                         width=20),
                'address':
                Form.NumericInput(swidth=20, tp=Form.FT_HEX),
                'comment':
                Form.StringInput(swidth=60),
                'hook_type':
                Form.RadGroupControl(
                    ("set_inst", "set_func"), secondary=False),
                'trigger':
                Form.RadGroupControl(("set_once", "set_perm"), secondary=True),
                'src_file_enter':
                Form.StringLabel(
                    recentOnEnter if recentOnEnter is not None else "",
                    tp='f'),
                'script_enter':
                Form.MultiLineTextControl(flags=self.textFlags,
                                          tabsize=self.textTab,
                                          width=200,
                                          swidth=200),
                'loadfile_enter':
                Form.ButtonInput(self.onLoadEnter),
                'update_enter':
                Form.ButtonInput(self.onUpdateEnter),
                'src_file_leave':
                Form.StringLabel(
                    recentOnLeave if recentOnLeave is not None else "",
                    tp='f'),
                'script_leave':
                Form.MultiLineTextControl(flags=self.textFlags,
                                          tabsize=self.textTab,
                                          width=200,
                                          swidth=200),
                'loadfile_leave':
                Form.ButtonInput(self.onLoadLeave),
                'update_leave':
                Form.ButtonInput(self.onUpdateLeave),
            })
        self.recentScriptFileEnter = recentOnEnter
        self.recentScriptFileLeave = recentOnLeave
Esempio n. 21
0
File: ui.py Progetto: r0mpage/idarop
    def __init__(self, idaropengine, select_list=None):

        self.engine = idaropengine
        self.select_list = select_list
        self.segments = SegmentView(self.engine)

        Form.__init__(
            self, r"""BUTTON YES* Search
Search ROP gadgets

{FormChangeCb}<Segments:{cEChooser}>

<Bad Chars        :{strBadChars}>     
Unicode Table    <ANSI:{rUnicodeANSI}><OEM:{rUnicodeOEM}><UTF7:{rUnicodeUTF7}><UTF8:{rUnicodeUTF8}>{radUnicode}>

<Max gadget size  :{intMaxRopSize}>      
<Max gadget offset:{intMaxRopOffset}>       <Search for ROP gadgets:{cRopSearch}>
<Max RETN imm16   :{intMaxRetnImm}>         <Search for JOP gadgets:{cJopSearch}>
<Max gadgets      :{intMaxRops}>            <Search for SYS gadgets:{cSysSearch}>{gadgetGroup}>

Others settings:
<Allow conditional jumps:{cRopAllowJcc}> <Do not allow bad bytes:{cRopNoBadBytes}>{ropGroup}>
""", {
                'cEChooser':
                Form.EmbeddedChooserControl(self.segments, swidth=110),
                'ropGroup':
                Form.ChkGroupControl(('cRopAllowJcc', 'cRopNoBadBytes')),
                'gadgetGroup':
                Form.ChkGroupControl(
                    ('cRopSearch', 'cJopSearch', 'cSysSearch')),
                'intMaxRopSize':
                Form.NumericInput(swidth=4,
                                  tp=Form.FT_DEC,
                                  value=self.engine.rop.maxRopSize),
                'intMaxRopOffset':
                Form.NumericInput(swidth=4,
                                  tp=Form.FT_DEC,
                                  value=self.engine.rop.maxRopOffset),
                'intMaxRops':
                Form.NumericInput(
                    swidth=4, tp=Form.FT_DEC, value=self.engine.rop.maxRops),
                'intMaxRetnImm':
                Form.NumericInput(swidth=4,
                                  tp=Form.FT_HEX,
                                  value=self.engine.rop.maxRetnImm),
                'intMaxJopImm':
                Form.NumericInput(
                    swidth=4, tp=Form.FT_HEX, value=self.engine.rop.maxJopImm),
                'strBadChars':
                Form.StringInput(swidth=92, tp=Form.FT_ASCII),
                'radUnicode':
                Form.RadGroupControl(("rUnicodeANSI", "rUnicodeOEM",
                                      "rUnicodeUTF7", "rUnicodeUTF8")),
                'strBadMnems':
                Form.StringInput(
                    swidth=92,
                    tp=Form.FT_ASCII,
                    value=
                    "into, in, out, loop, loope, loopne, lock, rep, repe, repz, repne, repnz"
                ),
                'FormChangeCb':
                Form.FormChangeCb(self.OnFormChange),
            })

        self.Compile()