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, api_db_folder): self.invert = False self.chosenValues = [] self.apiDbChooser = ApiDbChooser("ApiDBs", api_db_folder, flags=Choose.CH_MULTI) Form.__init__(self, r"""STARTITEM {id:rNormal} BUTTON YES* Run BUTTON CANCEL Cancel IDA ApiScout {FormChangeCb} Please select one or more API DBs from your apiscout/dbs folder: <Available API DBs:{cApiDbChooser}> or load a database from another location: <#Select a file to open#:{iFileOpen}> <##Ignore ASLR offsets:{rAslr}>{cGroup1}> """, { 'iAslrOffset': Form.NumericInput(tp=Form.FT_UINT64, value=0x0), 'iFileOpen': Form.FileInput(swidth=40, open=True, value="*.*"), 'cGroup1': Form.ChkGroupControl(("rAslr", "rNormal")), 'FormChangeCb': Form.FormChangeCb(self.OnFormChange), 'cApiDbChooser' : Form.EmbeddedChooserControl(self.apiDbChooser) })
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()
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()
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), })
def __init__(self): Form.__init__( self, r"""Marx IDA Import Script <#Select a hierarchy file to open# Hierarchy File:{iHierarchyFileOpen}> <#Select a new operators file to open#New Operators File:{iNewOpFileOpen}> <#Select a vcalls file to open# Vcalls File:{iVcallFileOpen}> <#Select a Vtables file to open# Vtables File:{iVTablesFileOpen}> Class hierarchies <Allow hierarchies with only one class:{rAllowSingleClassHierarchies}>{cHierarchies}> """, { 'iHierarchyFileOpen': Form.FileInput(open=True, value="*.hierarchy"), 'iNewOpFileOpen': Form.FileInput(open=True, value="*.new_operators"), 'iVcallFileOpen': Form.FileInput(open=True, value="*.vcalls_extended"), 'iVTablesFileOpen': Form.FileInput(open=True, value="*_vtables.txt"), 'cHierarchies': Form.ChkGroupControl(("rAllowSingleClassHierarchies", )) })
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 for heuristical comparisons (slow):{rUseDecompiler}>{cGroup1}> Project Specific Rules <#Select the project specific Python script rules #Python script :{iProjectSpecificRules}> """ args = { 'iFileOpen': Form.FileInput(open=True, swidth=45), 'iProjectSpecificRules': 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)
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}> """ args = { 'iFileOpen': Form.FileInput(open=True, swidth=45), 'iIndentCommand': Form.StringInput(swidth=45), 'iMinLevel': Form.StringInput(swidth=10), 'iMinDisplayLevel': Form.StringInput(swidth=10) } Form.__init__(self, s, args)
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), })
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): Form.__init__( self, r"""STARTITEM 0 Pick Symbol File <#Select a file to open#Browse to open:{iFileOpen}>""", {'iFileOpen': Form.FileInput(open=True)})