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()
def __init__(self, module, address, symbol, recentOnEnter, recentOnLeave): Form.__init__( self, r"""STARTITEM {id:script_enter} BUTTON YES* Save BUTTON CANCEL Cancel Function Hook {segment} {address}: {symbol} <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}> """, { 'segment': Form.StringLabel("[" + module + "]", tp='F'), 'address': Form.StringLabel(address, tp='A'), 'symbol': Form.StringLabel(symbol, tp='X'), 'trigger': Form.RadGroupControl(("set_once", "set_perm")), '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
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()
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) })
def __init__(self, engine, modules): Form.__init__( self, r"""STARTITEM {id:address} BUTTON YES* OK BUTTON CANCEL Cancel Convert real address to IDB offset {FormChangeCb} <Module\: :{module}> <##Real address\::{address}> Module base: {mod_base} <##IDB address\: :{idb_addr}> """, { 'module': Form.DropdownListControl(items=modules, readonly=True, selval=0, swidth=20, width=20), 'address': Form.NumericInput(swidth=20, tp=Form.FT_HEX), 'mod_base': Form.StringLabel("0x0", tp='A'), 'idb_addr': Form.NumericInput(swidth=20, tp=Form.FT_HEX), 'FormChangeCb': Form.FormChangeCb(self.OnFormChange) }) self.engine = engine
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()
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
def __init__(self, lines, prompt): self.prompt = prompt print("in okTextForm init") if prompt: Form.__init__( self, r"""STARTITEM 0 BUTTON YES* OK BUTTON NO NONE BUTTON CANCEL NONE CGC Ida Client Help {FormChangeCb} <Don't show help at startup:{nShow}>{cGroup1}> {cStr1} {cStr2} """, { 'cStr1': Form.StringLabel(lines['overview']), 'cStr2': Form.StringLabel(lines['hotkeys']), 'cGroup1': Form.ChkGroupControl(("nShow", "")), 'FormChangeCb': Form.FormChangeCb(self.OnFormChange), }) else: Form.__init__( self, r"""STARTITEM 0 BUTTON YES* OK BUTTON NO NONE BUTTON CANCEL NONE CGC Ida Client Help {FormChangeCb} {cStr1} """, { 'cStr1': Form.StringLabel(lines['overview']), 'cStr2': Form.StringLabel(lines['hotkeys']), 'cGroup1': Form.ChkGroupControl(("nShow", "")), 'FormChangeCb': Form.FormChangeCb(self.OnFormChange), })
def __init__(self, module, address, mnemonic, recentFile): Form.__init__( self, r"""STARTITEM {id:script} BUTTON YES* Save BUTTON CANCEL Cancel Instruction Hook {segment} {address}: {mnemonic} <Once:{set_once}> <Permanent:{set_perm}>{trigger}> 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'), 'mnemonic': Form.StringLabel(mnemonic, tp='X'), 'trigger': Form.RadGroupControl(("set_once", "set_perm")), 'src_file': Form.StringLabel(recentFile if recentFile is not None else "", tp='f'), 'script': Form.MultiLineTextControl(flags=self.textFlags, tabsize=self.textTab, width=200, swidth=200), 'loadfile': Form.ButtonInput(self.onLoad), 'update': Form.ButtonInput(self.onUpdate), }) self.recentScriptFile = recentFile
def __init__(self): print("in init") Form.__init__( self, r"""STARTITEM 0 BUTTON YES* OK BUTTON NO NONE BUTTON CANCEL NONE Please wait, CGC Monitor working... {FormChangeCb} {cStr1} """, { 'cStr1': Form.StringLabel("Please wait, CGC Monitor working..."), 'FormChangeCb': Form.FormChangeCb(self.OnFormChange), })
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) })
def __init__(self): Form.__init__( self, r"""BUTTON YES* NONE BUTTON NO NONE BUTTON CANCEL NONE DIE - Dynamic IDA Enrichment {FormChangeCb} {imgDIE} DIE - Dynamic IDA Enrichment Framework Version 0.1 Written by: Yaniv Balmas. """, { 'imgDIE': Form.StringLabel(""), 'FormChangeCb': Form.FormChangeCb(self.OnFormChange), }) self.Compile()
def __init__(self, engine, recentFile): Form.__init__(self, r"""STARTITEM {id:script} BUTTON YES* Save BUTTON CANCEL Close Execute Custom Frida Script Recent source file:{src_file} <##Script source code\::{script}> <##Load from file:{loadfile}><##Update from file:{update}><##Execute:{execute}> """, { 'src_file': Form.StringLabel(recentFile if recentFile is not None else "", tp='f'), 'script': Form.MultiLineTextControl(flags=self.textFlags, tabsize=self.textTab, width=200, swidth=200), 'loadfile': Form.ButtonInput(self.onLoad), 'update': Form.ButtonInput(self.onUpdate), 'execute': Form.ButtonInput(self.onExecute), }) self.engine = engine self.recentScriptFile = recentFile
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, 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