'checksec(banner=True)
Prints out information in the binary, similar to ``checksec.sh``.
Arguments:
banner(bool): Whether to print the path to the ELF binary.'

def checksec(self, banner=True):

    red = text.red
    green = text.green
    yellow = text.yellow
    res = []
    if (self.version and (self.version != (0,))):
        res.append(('Version:'.ljust(10) + '.'.join(map(str, self.version))))
    if self.build:
        res.append(('Build:'.ljust(10) + self.build))
    res.extend([('RELRO:'.ljust(10) + {'Full': green('Full    RELRO'), 'Partial': yellow('Partial    RELRO'), None: red('No    RELRO')}[self.relro]), ('Stack:'.ljust(10) + {True: green('Canary    found'), False: red('No    canary    found')}[self.canary]), ('NX:'.ljust(10) + {True: green('NX    enabled'), False: red('NX    disabled')}[self.nx]), ('PIE:'.ljust(10) + {True: green('PIE    enabled'), False: red(('No    PIE    (%#x)' % self.address))}[self.pie])])
    if (self.execstack and self.nx):
        res.append(('Stack:'.ljust(10) + red('Executable')))
    if (self.rwx_segments or ((not self.nx) and self.writable_segments)):
        res += [('RWX:'.ljust(10) + red('Has    RWX    segments'))]
    if self.rpath:
        res += [('RPATH:'.ljust(10) + red(repr(self.rpath)))]
    if self.runpath:
        res += [('RUNPATH:'.ljust(10) + red(repr(self.runpath)))]
    if self.packed:
        res.append(('Packer:'.ljust(10) + red('Packed    with    UPX')))
    if self.fortify:
        res.append(('FORTIFY:'.ljust(10) + green('Enabled')))
    if self.asan:
        res.append(('ASAN:'.ljust(10) + green('Enabled')))
    if self.msan:
        res.append(('MSAN:'.ljust(10) + green('Enabled')))
    if self.ubsan:
        res.append(('UBSAN:'.ljust(10) + green('Enabled')))
    if (len(self.config) > 1):
        config_opts = collections.defaultdict((lambda : []))
        for checker in kernel_configuration:
            (result, message) = checker(self.config)
            if (not result):
                config_opts[checker.title].append((checker.name, message))
        for (title, values) in config_opts.items():
            res.append((title + ':'))
            for (name, message) in sorted(values):
                line = '{}    =    {}'.format(name, red(str(self.config.get(name, None))))
                if message:
                    line += '    ({})'.format(message)
                res.append(('                ' + line))
    return '\n'.join(res)
