Example #1
0
    def __str__(self):
        if not len(self.__lines):
            return "empty gadget"
        toReturn = cstr('Gadget', Color.GREEN)+': %s\n' % (cstr(toHex(self.__lines[0][0] + self.imageBase, self.__arch.addressLength), Color.BLUE))
        for line in self.__lines:
            toReturn += cstr(toHex(line[0] + self.imageBase, self.__arch.addressLength), Color.RED) +': '+ cstr(line[1], Color.LIGHT_GRAY) + '\n'

        return toReturn
Example #2
0
    def __str__(self):
        if not len(self.__lines):
            return "empty gadget"
        toReturn = cstr('Gadget', Color.GREEN)+': %s\n' % (cstr(toHex(self.__lines[0][0] + self.__imageBase, self.__arch.addressLength), Color.BLUE))
        for line in self.__lines:
            toReturn += cstr(toHex(line[0] + self.__imageBase, self.__arch.addressLength), Color.RED) +': '+ cstr(line[1], Color.LIGHT_GRAY) + '\n'

        return toReturn
Example #3
0
    def __str__(self):
        toReturn = cstr('Gadget', Color.GREEN) + ': %s\n' % (cstr(
            toHex(self.__lines[0][0] + self.__imageBase,
                  self.__arch.addressLength), Color.RED))
        for line in self.__lines:
            toReturn += cstr(
                toHex(line[0] + self.__imageBase, self.__arch.addressLength),
                Color.BLUE) + ': ' + cstr(line[1], Color.WHITE) + '\n'

        return toReturn
Example #4
0
    def __str__(self):
        if not len(self.__lines):
            return "empty gadget"
        toReturn = cstr("Gadget", Color.GREEN) + ": %s\n" % (
            cstr(toHex(self.__lines[0][0] + self.__imageBase, self.__arch.addressLength), Color.BLUE)
        )
        for line in self.__lines:
            toReturn += (
                cstr(toHex(line[0] + self.__imageBase, self.__arch.addressLength), Color.RED)
                + ": "
                + cstr(line[1], Color.LIGHT_GRAY)
                + "\n"
            )

        return toReturn
Example #5
0
    def disassemblyString(self):
        toReturn = ""
        for line in self.__lines:
            toReturn += (
                cstr(toHex(line[0] + self.__imageBase, self.__arch.addressLength), Color.RED)
                + ": "
                + cstr(line[1], Color.LIGHT_GRAY)
                + "\n"
            )

        return toReturn
Example #6
0
    def disassemblyString(self):
        toReturn = ''
        for line in self.__lines:
            toReturn += cstr(toHex(line[0] + self.imageBase, self.__arch.addressLength), Color.RED) +': '+ cstr(line[1], Color.LIGHT_GRAY) + '\n'

        return toReturn
Example #7
0
 def simpleString(self):
     toReturn = '%s: ' % cstr(toHex(self.__lines[0][0] + self.imageBase, self.__arch.addressLength), Color.RED)
     toReturn += self.simpleInstructionString()
     return toReturn
Example #8
0
    def __str__(self):
        toReturn = cstr('Gadget', Color.GREEN)+': %s\n' % (cstr(toHex(self.__lines[0][0] + self.__imageBase, self.__arch.addressLength), Color.RED))
        for line in self.__lines:
            toReturn += cstr(toHex(line[0] + self.__imageBase, self.__arch.addressLength), Color.BLUE) +': '+ cstr(line[1], Color.WHITE) + '\n'

        return toReturn
Example #9
0
 def simpleString(self):
     toReturn = '%s: ' % cstr(
         toHex(self.__lines[0][0] + self.__imageBase,
               self.__arch.addressLength), Color.RED)
     toReturn += self.simpleInstructionString()
     return toReturn
Example #10
0
    def disassemblyString(self):
        toReturn = ''
        for line in self.__lines:
            toReturn += cstr(toHex(line[0] + self.__imageBase, self.__arch.addressLength), Color.RED) +': '+ cstr(line[1], Color.LIGHT_GRAY) + '\n'

        return toReturn