'Check for various security options of binary
For full features, use http://www.trapkit.de/tools/checksec.sh
Usage:
MYNAME [file]'

def checksec(self, *arg):

    (filename,) = normalize_argv(arg, 1)
    colorcodes = {0: red('disabled'), 1: green('ENABLED'), 2: yellow('Partial'), 3: green('FULL'), 4: yellow('Dynamic    Shared    Object')}
    result = peda.checksec(filename)
    if result:
        for (k, v) in sorted(result.items()):
            msg(('%s:    %s' % (k.ljust(10), colorcodes[v])))
    return
