def __init__(self):
        Choose2.__init__(self,
                         "Patches",
                         [ ["Address",  10 | Choose2.CHCOL_HEX], 
                           ["Name",     18 | Choose2.CHCOL_PLAIN], 
                           ["Size",      4 | Choose2.CHCOL_DEC], 
                           ["Modified", 10 | Choose2.CHCOL_HEX],
                           ["Original", 10 | Choose2.CHCOL_HEX], 
                           ["Comment",  30 | Choose2.CHCOL_PLAIN]
                         ],
                         flags = Choose2.CH_MULTI_EDIT)

        self.popup_names = ["Insert", "Delete", "Edit", "Refresh"]
        
        self.icon = 47

        # Items for display and corresponding data
        # NOTE: Could become desynchronized, so to avoid this
        #       refresh the view after each change.
        self.items = []
        self.items_data  = []

        # Initialize/Refresh the view
        self.refreshitems()

        # Data members
        self.patch_file = None
        self.restore = False

        # Command callbacks
        self.cmd_apply_patches = None
        self.cmd_restore_bytes = None
示例#2
0
 def __init__(self, title):
     Choose2.__init__(self, title,
                      [["Segment", 9], ["Function name", 20],
                       ["Address", 9], ["Opty name", 20], ["Address", 9]])
     self.n = 0
     self.items = self.populate_items()
     self.popup_names = ["", "Delete", "Delete Segment", "Refresh"]
示例#3
0
 def __init__(self, title, items):
     Choose2.__init__(self,
                      title,
                      [["Name", 60], ["Address", 10], ["Ordinal", 10], ["Original Name", 60]],
                      embedded=False)
     self.items = items
     self.icon = 135
示例#4
0
 def __init__(self, title, items, icon, embedded=False):
     Choose2.__init__(self,
                      title,
                      [ ["Antivirus", 20], ["Result", 40] ],
                      embedded=embedded)
     self.items = items
     self.icon = icon
示例#5
0
	def __init__(self, title, func_profile, color):
		Choose2.__init__(self, title, [ ["Address", 10 | Choose2.CHCOL_HEX], ["Name", 15 | Choose2.CHCOL_PLAIN] ])
		self.n = 0
		self.icon = 41
		self.functions = func_profile
		self.color = color
		self.PopulateItems()
示例#6
0
    def __init__(self, title, l):
        columns = [
            ["Line", 4],
            ["EA", 16],
            ["Function Name", 25],
            ["Candidate", 25],
            ["FP?", 2],
            ["Strings", 50],
        ]
        Choose2.__init__(self, title, columns, Choose2.CH_MULTI)
        self.n = 0
        self.icon = -1
        self.selcount = 0
        self.modal = False
        self.items = []
        self.selected_items = []

        i = 0
        for item in l:
            bin_func = item[1]
            candidate = item[2]
            seems_false = str(int(self.looks_false(bin_func, candidate)))
            line = [
                "%03d" % i,
                "0x%08x" % item[0], item[1], item[2], seems_false,
                ", ".join(item[3])
            ]
            self.items.append(line)
            i += 1

        self.items = sorted(self.items, key=lambda x: x[4])
示例#7
0
 def __init__(self, title, icon):
     Choose2.__init__(self,
                      title,
                      [ ["Item", 10] ],
                      icon=icon,
                      flags=Choose2.CH_NOIDB,
                      embedded=True, width=30, height=20)
示例#8
0
    def __init__(self, title):
        columns = [
            ["Line", 4],
            ["Full path", 20],
            ["Filename", 15],
            ["EA", 16],
            ["Function Name", 18],
            ["String data", 40],
        ]
        Choose2.__init__(self, title, columns, Choose2.CH_MULTI)
        self.n = 0
        self.icon = -1
        self.selcount = 0
        self.modal = False
        self.items = []
        self.selected_items = []

        d, s = get_source_strings()
        keys = d.keys()
        keys.sort()

        i = 0
        for key in keys:
            for ea, name, str_data in d[key]:
                line = [
                    "%03d" % i, key,
                    basename(key),
                    "0x%08x" % ea, name, str_data
                ]
                self.items.append(line)
                i += 1

        self.d = d
        self.s = s
示例#9
0
文件: ui.py 项目: r0mpage/idarop
    def __init__(self, idarop):

        self.idarop = idarop

        SegmentChoose.__init__(
            self,
            "Segments",
            [
                ["Name", 13 | SegmentChoose.CHCOL_PLAIN],
                ["Start", 13 | SegmentChoose.CHCOL_HEX],
                ["End", 10 | SegmentChoose.CHCOL_HEX],
                ["Size", 10 | SegmentChoose.CHCOL_HEX],
                ["R", 1 | SegmentChoose.CHCOL_PLAIN],
                ["W", 1 | SegmentChoose.CHCOL_PLAIN],
                ["X", 1 | SegmentChoose.CHCOL_PLAIN],
                ["Class", 8 | SegmentChoose.CHCOL_PLAIN],
            ],
            flags=SegmentChoose.CH_MULTI,  # Select multiple modules
            embedded=True)

        self.icon = 150

        # Items for display
        self.items = list()

        # Selected items
        self.select_list = list()

        # Initialize/Refresh the view
        self.refreshitems()
示例#10
0
文件: ui.py 项目: r0mpage/idarop
    def __init__(self, idarop):

        self.idarop = idarop

        Choose2.__init__(self,
                         "ROP gadgets", [
                             ["Segment", 13 | Choose2.CHCOL_PLAIN],
                             ["Address", 13 | Choose2.CHCOL_HEX],
                             ["Return Address", 13 | Choose2.CHCOL_HEX],
                             ["Gadget", 30 | Choose2.CHCOL_PLAIN],
                             ["Opcodes", 20 | Choose2.CHCOL_PLAIN],
                             ["Size", 3 | Choose2.CHCOL_DEC],
                             ["Pivot", 4 | Choose2.CHCOL_DEC],
                         ],
                         flags=Choose2.CH_MULTI)

        self.icon = 182

        # Items for display
        self.items = []

        # rop list cache for instantaneous loading if there has not been any new data
        self.rop_list_cache = None

        # Initialize/Refresh the view
        self.refreshitems()

        # export as csv command
        self.cmd_export_csv = None

        # clear result command
        self.clear_rop_list = None
示例#11
0
	def __init__(self):
		Choose2.__init__(self,
			"Bundled Assembly Manager",
			[
				["Index",                      6 | Choose2.CHCOL_DEC], 
				["FileItemStructOffset",      18 | Choose2.CHCOL_HEX], 
				["FileNameOffset",            18 | Choose2.CHCOL_HEX], 
				["FileDataOffset",            18 | Choose2.CHCOL_HEX], 
				["FileSize",                  18 | Choose2.CHCOL_HEX], 
				["FileSizeOffset",            18 | Choose2.CHCOL_HEX], 
				["FileCompressedSizeOffset",  18 | Choose2.CHCOL_HEX], 
				["FileCompressedSize",        18 | Choose2.CHCOL_HEX], 
				["IsCompressed",              4  | Choose2.CHCOL_PLAIN], 
				["IsGZip",                    4  | Choose2.CHCOL_PLAIN], 
				["IsME",                      4  | Choose2.CHCOL_PLAIN], 
				["FileName",                  18 | Choose2.CHCOL_PLAIN]
			])
		#self.popup_names = ["Insert", "Delete", "Edit", "Refresh"]

		self.icon = 47

		self.tool = None
		
		self.items = []
		self.items_data = []

		# Command callbacks
		self.cmd_Items_SaveAs = None
		self.cmd_Item_SaveAs = None
		self.cmd_Item_ReplaceBy = None
示例#12
0
    def __init__(self):
        Choose2.__init__(self,
                         "Patches", [["Address", 10 | Choose2.CHCOL_HEX],
                                     ["Name", 18 | Choose2.CHCOL_PLAIN],
                                     ["Size", 4 | Choose2.CHCOL_DEC],
                                     ["Modified", 10 | Choose2.CHCOL_HEX],
                                     ["Original", 10 | Choose2.CHCOL_HEX],
                                     ["Comment", 30 | Choose2.CHCOL_PLAIN]],
                         flags=Choose2.CH_MULTI_EDIT)

        self.popup_names = ["Insert", "Delete", "Edit", "Refresh"]

        self.icon = 47

        # Items for display and corresponding data
        # NOTE: Could become desynchronized, so to avoid this
        #       refresh the view after each change.
        self.items = []
        self.items_data = []

        # Initialize/Refresh the view
        self.refreshitems()

        # Data members
        self.patch_file = None
        self.restore = False

        # Command callbacks
        self.cmd_apply_patches = None
        self.cmd_restore_bytes = None
示例#13
0
  def __init__(self, differ, title, matches, importer_obj):
    self.importer = importer_obj
    self.differ = differ
    columns = [ ["Line", 4], ["Id", 4], ["Source Function", 20], ["Local Address", 14], ["Local Name", 14], ["Ratio", 4], ["ML", 4], ["AVG", 4], ["SR", 4], ["Heuristic", 25], ]
    if _DEBUG:
      self.columns.append(["FP?", 6])
      self.columns.append(["Reasons", 40])

    Choose2.__init__(self, title, columns, Choose2.CH_MULTI)
    self.n = 0
    self.icon = -1
    self.selcount = 0
    self.modal = False
    self.items = []
    self.selected_items = []

    for i, match in enumerate(matches):
      ea, name, heuristic, score, reason, ml, qr = matches[match]
      bin_func_name = GetFunctionName(long(ea))
      line = ["%03d" % i, "%05d" % match, name, "0x%08x" % long(ea), bin_func_name, str(score), str(ml), str((score + ml)/2), str(qr), heuristic, reason]
      if _DEBUG:
        maybe_false_positive = int(seems_false_positive(name, bin_func_name))
        line.append(str(maybe_false_positive))
        line.append(reason)
      self.items.append(line)

    self.items = sorted(self.items, key= lambda x: (max(x[5], x[6], x[5]+x[6]),), reverse=True)
示例#14
0
 def __init__(self, title, mynav=None):
     Choose2.__init__(self, title, [ ["Line", 8], ["Address", 10], ["Name", 30] ])
     self.n = 0
     self.items = []
     self.item_relations = {}
     self.icon = 41
     self.mynav = mynav
示例#15
0
 def __init__(self, title, mynav=None):
     Choose2.__init__(self, title, [["Line", 8], ["Address", 10], ["Name", 30]])
     self.n = 0
     self.items = []
     self.item_relations = {}
     self.icon = 41
     self.mynav = mynav
 def __init__(self, title, flags=0):
     Choose2.__init__(self,
                      title,
                      [ ["Address", 12 | Choose2.CHCOL_DEC],
                        ["Function Name", 20 | Choose2.CHCOL_PLAIN] ],
                      embedded=True, width=35, height=10,  flags=flags)
     self.PopulateItems()
示例#17
0
	def __init__(self):
		Choose2.__init__(self,
			"Bundled Assembly Manager",
			[["Index",                      4 | Choose2.CHCOL_DEC], 
				["FileItemStructOffset",      10 | Choose2.CHCOL_HEX], 
				["FileNameOffset",            10 | Choose2.CHCOL_HEX], 
				["FileDataOffset",            10 | Choose2.CHCOL_HEX], 
				["FileSize",                  10 | Choose2.CHCOL_HEX], 
				["FileSizeOffset",            10 | Choose2.CHCOL_HEX], 
				["FileCompressedSizeOffset",  10 | Choose2.CHCOL_HEX], 
				["FileCompressedSize",        10 | Choose2.CHCOL_HEX], 
				["IsGZip",                    18 | Choose2.CHCOL_PLAIN], 
				["FileName",                  18 | Choose2.CHCOL_PLAIN]])
		#self.popup_names = ["Insert", "Delete", "Edit", "Refresh"]
		
		self.icon = 47
		
		self.items = []
		self.items_data = []

		# Command callbacks
		self.cmd_Items_SaveAs = None
		self.cmd_Item_SaveAs = None
		self.cmd_Item_ReplaceBy = None

		try:
			self.tool = MKBundleTool()
			# Initialize/Refresh the view
			self.refreshitems()
		except:
			traceback.print_exc()
示例#18
0
 def __init__(self, title, func_profile, color):
     Choose2.__init__(self, title, [["Address", 10 | Choose2.CHCOL_HEX],
                                    ["Name", 15 | Choose2.CHCOL_PLAIN]])
     self.n = 0
     self.icon = 41
     self.functions = func_profile
     self.color = color
     self.PopulateItems()
示例#19
0
 def __init__(self, title, nb=5, mynav=None):
     Choose2.__init__(self, title, [["Session Name", 10]])
     self.n = 0
     self.items = []
     self.icon = 5
     self.selcount = 0
     self.mynav = mynav
     print "created", str(self)
示例#20
0
 def __init__(self, title, nb=5, mynav=None):
     Choose2.__init__(self, title, [["Session Name", 10]])
     self.n = 0
     self.items = []
     self.icon = 5
     self.selcount = 0
     self.mynav = mynav
     print "created", str(self)
 def __init__(self, manager, flags=0):
     Choose2.__init__(self,
                      "cnns",
                      [
                        ["Connection Identifier", 30 | Choose2.CHCOL_PLAIN] ],
                      embedded=True, width=25, height=6,  flags=flags)
     self.manager = manager
     self.UpdateItems()
示例#22
0
 def __init__(self, title, ea1, ea2):
     Choose2.__init__(self, title, [ ["VA", 10], ["PTE attr", 30] ])
     self.ea1 = ea1
     self.ea2 = ea2
     self.n = 0
     self.icon = 5
     self.items = []
     self.Refresh()
     self.selcount = 0
示例#23
0
 def __init__(self, title, nb = 5, deflt=1):
     Choose2.__init__(self, title, [ ["Address", 10], ["Name", 30] ])
     self.n = 0
     self.items = [ self.make_item() for x in xrange(0, nb+1) ]
     self.icon = 5
     self.selcount = 0
     self.deflt = deflt
     self.popup_names = ["Inzert", "Del leet", "Ehdeet", "Ree frech"]
     print("created %s" % str(self))
示例#24
0
 def __init__(self, title, ea1, ea2):
     Choose2.__init__(self, title, [["VA", 10], ["PTE attr", 30]])
     self.ea1 = ea1
     self.ea2 = ea2
     self.n = 0
     self.icon = 5
     self.items = []
     self.Refresh()
     self.selcount = 0
 def __init__(self, title, flags=0):
     Choose2.__init__(self,
                      title, [["Address", 12 | Choose2.CHCOL_DEC],
                              ["Function Name", 20 | Choose2.CHCOL_PLAIN]],
                      embedded=True,
                      width=35,
                      height=10,
                      flags=flags)
     self.PopulateItems()
示例#26
0
 def __init__(self, title, nb=5, deflt=1):
     Choose2.__init__(self, title, [["Address", 10], ["Name", 30]])
     self.n = 0
     self.items = [self.make_item() for x in xrange(0, nb + 1)]
     self.icon = 5
     self.selcount = 0
     self.deflt = deflt
     self.popup_names = ["Inzert", "Del leet", "Ehdeet", "Ree frech"]
     print("created %s" % str(self))
 def __init__(self, manager, flags=0):
     Choose2.__init__(self,
                      "cnns",
                      [["Connection Identifier", 30 | Choose2.CHCOL_PLAIN]],
                      embedded=True,
                      width=25,
                      height=6,
                      flags=flags)
     self.manager = manager
     self.UpdateItems()
示例#28
0
	def __init__(self, title, func_chooser, first_prof_name, second_prof_name):
		Choose2.__init__(self, title, [ ["Address", 10 | Choose2.CHCOL_HEX], ["Name", 15 | Choose2.CHCOL_PLAIN] ])
		self.n = 0
		self.icon = 41
		self.first_flist = func_chooser['first']
		self.second_flist = func_chooser['second']
		self.comm_flist = func_chooser['comm']
		self.first_prof_name = first_prof_name
		self.second_prof_name = second_prof_name
		self.PopulateItems()
示例#29
0
 def __init__(self, title, api_db_folder, flags=0):
     Choose.__init__(self,
                      title,
                      [["Filename", 25], ["OS Version", 20], ["ASLR Offset?", 8], ["DLLs", 6], ["APIs", 6]],
                      embedded=True, width=120, height=10, flags=flags)
     self.row_count = 0
     self.api_db_folder = api_db_folder
     self.items = self.populate(api_db_folder)
     self.icon = 4
     self.selcount = 0
示例#30
0
 def __init__(self, title, func_chooser, first_prof_name, second_prof_name):
     Choose2.__init__(self, title, [["Address", 10 | Choose2.CHCOL_HEX],
                                    ["Name", 15 | Choose2.CHCOL_PLAIN]])
     self.n = 0
     self.icon = 41
     self.first_flist = func_chooser['first']
     self.second_flist = func_chooser['second']
     self.comm_flist = func_chooser['comm']
     self.first_prof_name = first_prof_name
     self.second_prof_name = second_prof_name
     self.PopulateItems()
示例#31
0
    def __init__(self, value, results):

        Choose.__init__(
            self,
            "[IdaMagnum] Select enum from MagnumDB.com for value : 0x%X" %
            value, [
                ["name", 13 | Choose.CHCOL_PLAIN],
                ["value", 10 | Choose.CHCOL_HEX],
                ["source", 13 | Choose.CHCOL_PLAIN],
            ], Choose.CH_MODAL)

        self._results = results
 def __init__(self, resolved):
     Choose2.__init__(self, "Resolved Indirect Brances", [ ["Branch Address", 16], ["Target Address", 16], ["Target Name", 32], ["Additional", 32]])
     self.n = 0
     
     self.items = []
     for (ins_addr, branch_addr) in resolved:
         self.items += [self.make_item(ins_addr, branch_addr)]
     
     self.icon = 0
     self.selcount = 0
     self.deflt = -1
     self.popup_names = ["NOSE"]
示例#33
0
    def __init__(self, functions):
        Choose2.__init__(self, "Interesting function",
                         [["Function Address", 16], ["Function Name", 32]])
        self.n = 0

        self.items = []
        for ins_addr in functions:
            self.items += [self.make_item(ins_addr)]

        self.icon = 0
        self.selcount = 0
        self.deflt = -1
        self.popup_names = ["NOSE"]
示例#34
0
    def __init__(self, reached_functions):
        Choose2.__init__(self, "Functions reached",
                         [["Address", 16], ["Name", 16]])
        self.n = 0

        self.items = []
        for value in reached_functions:
            self.items += [self.make_item(value, GetAddressName(value))]

        self.icon = 0
        self.selcount = 0
        self.deflt = -1
        self.popup_names = ["NOSE"]
    def __init__(self):
        Choose2.__init__(self,
                         "Korean Strings",
                         [["Address", 10 | Choose2.CHCOL_HEX],
                          ["Name", 50 | Choose2.CHCOL_PLAIN]],
                         flags=Choose2.CH_MULTI_EDIT)

        self.popup_names = ["Refresh"]
        self.icon = 80
        self.items = []
        self.items_data = []
        self.encoding = None

        self.cmd_select_encoding = None
示例#36
0
 def __init__(self, title, api_results, flags=0):
     Choose.__init__(self,
                      title,
                      [["#", 6], ["Offset", 14], ["API Address", 14], ["DLL", 20], ["API", 35]],
                      embedded=True, width=140, height=20, flags=flags)
     self.row_count = 0
     self.base_address = [ea for ea in idautils.Segments()][0]
     self.scout = ApiScout()
     self.scout.setBaseAddress(self.base_address)
     self.api_results = api_results
     self.all_items = self.populate(api_results)
     self.items = self.populate(api_results)
     self.icon = 4
     self.selcount = 0
    def __init__(self, form, funcs, embedded = False):

        Choose2.__init__(self,
                         "Progress",
                         [ ["Function",     10 | Choose2.CHCOL_PLAIN],
                           ["Status", 10 | Choose2.CHCOL_PLAIN],
                           ["Progress", 20 | Choose2.CHCOL_PLAIN],
                         ],
                         embedded = embedded)
        self.icon = 47
        self.items = []
        self.items.append(["%s funcs" % len(funcs), "in progress", "see console"])
        self.form = form
        self.query = Query(form=self.form, funcs=funcs)
        self.query.start()
 def __init__(self, title, items, flags=0, width=None, height=None, embedded=False, modal=False):
     Choose2.__init__(
         self,
         title,
         [ ["Address", 5], ["Function", 5], ["Device", 15], ["Method", 15], ["Access", 30], ["C define", 100] ],
         flags = flags,
         width = width,
         height = height,
         embedded = embedded)
     self.n = 0
     self.items = items
     self.icon = 5
     self.selcount = 0
     self.modal = modal
     self.popup_names = ["Insert", "Delete", "Refresh"]
示例#39
0
 def __init__(self):
     Choose2.__init__(
         self,
         "Patcherex",
         [
             ["Type", 10 | Choose2.CHCOL_PLAIN],
             ["Address", 10 | Choose2.CHCOL_HEX],
             ["Name", 30 | Choose2.CHCOL_PLAIN],
             ["Data", 30 | Choose2.CHCOL_FORMAT]
         ])
     self.node = idaapi.netnode()
     self.node.create("$ patcherex")
     self.items = ItemManager(lambda: self.node.getblob(0, "I"),
                              lambda x: self.node.setblob(x, 0, "I"))
     self.popup_names = ["Add Patch", "Remove Patch", "Edit Patch", "Refresh"]
    def __init__(self, engine, flags=0, width=None, height=None, embedded=False):
        Choose2.__init__(
            self,
            "Memory Manager",
            [ ["Address", 20], ["Size", 10], ["Comment", 30] ],
            flags = flags,
            width = width,
            height = height,
            embedded = embedded
        )

        self.engine = engine
        self.linkList = []
        self.icon = -1
        self.popup_names = ["Insert...", "Delete", "Show", "Refresh"]
示例#41
0
    def __init__(self, form, funcs, embedded=False):

        Choose2.__init__(self,
                         "Progress", [
                             ["Function", 10 | Choose2.CHCOL_PLAIN],
                             ["Status", 10 | Choose2.CHCOL_PLAIN],
                             ["Progress", 20 | Choose2.CHCOL_PLAIN],
                         ],
                         embedded=embedded)
        self.icon = 47
        self.items = []
        self.items.append(
            ["%s funcs" % len(funcs), "in progress", "see console"])
        self.form = form
        self.query = Query(form=self.form, funcs=funcs)
        self.query.start()
示例#42
0
    def __init__(self, title, nb = 5, flags=0, width=None, height=None, embedded=False, modal=False):
        Choose2.__init__(
            self,
            title,
            [ ["Address", 10], ["Name", 30] ],
            flags = flags,
            width = width,
            height = height,
            embedded = embedded)
        self.n = 0
        self.items = [ self.make_item() for x in xrange(0, nb+1) ]
        self.icon = 5
        self.selcount = 0
        self.modal = modal
        self.popup_names = ["Inzert", "Del leet", "Ehdeet", "Ree frech"]

        print("created %s" % str(self))
示例#43
0
    def __init__(self, pomidor, embedded = False):

        self.pomidor = pomidor

        Choose2.__init__(self,
                         "IDA Pomidor",
                         [ ["Time",     14 | Choose2.CHCOL_PLAIN],
                           ["Duration",  5 | Choose2.CHCOL_PLAIN], 
                           ["Activity", 10 | Choose2.CHCOL_PLAIN], 
                         ],
                         embedded = embedded)

        self.icon = 47

        # Items for display and corresponding data
        # NOTE: Could become desynchronized, so to avoid this
        #       refresh the view after each change.
        self.items = []

        # Initialize/Refresh the view
        self.refreshitems()
 def __init__(self, title):
     Choose2.__init__(self, title, [ ["Segment", 9], ["Function name", 20], ["Address", 9], ["Opty name", 20], ["Address", 9] ])
     self.n = 0
     self.items = self.populate_items()
     self.popup_names = ["", "Delete", "Delete Segment", "Refresh"]