()
return
Display information about the running process.
Display information about the running process.
Display information about the running process .
def procinfo():
    """
    Display information about the running process.
    """
    if not psutil:
        print("psutil required but not installed")
        return

    exe  = str(pwndbg.auxv.get()['AT_EXECFN'])
    print("%-10s %r" % ("exe", exe))

    proc = Process()

    # qemu-usermode fail!
    if not proc.status:
        return

    files = dict(proc.open_files)

    for c in proc.connections:
        files[c.fd] = str(c)

    print("%-10s %s" % ("pid",     proc.pid))
    print("%-10s %s" % ("tid",     proc.tid))

    if proc.selinux != 'unconfined':
        print("%-10s %s" % ("selinux", proc.selinux))

    print("%-10s %s" % ("ppid",    proc.ppid))

    if not pwndbg.android.is_android():
        print("%-10s %s" % ("uid",     proc.uid))
        print("%-10s %s" % ("gid",     proc.gid))
        print("%-10s %s" % ("groups",  proc.groups))
    else:
        print("%-10s %s" % ("uid",     list(map(pwndbg.android.aid_name, proc.uid))))
        print("%-10s %s" % ("gid",     list(map(pwndbg.android.aid_name, proc.gid))))
        print("%-10s %s" % ("groups",  list(map(pwndbg.android.aid_name, proc.groups))))

    for fd, path in files.items():
        if not set(path) < set(string.printable):
            path = repr(path)

        print("%-10s %s" % ("fd[%i]" % fd, path))

    return
def procinfo ( ) : if not psutil : print ( "psutil required but not installed" ) return exe = str ( pwndbg . auxv . get ( ) [ 'AT_EXECFN' ] ) print ( "%-10s %r" % ( "exe" , exe ) ) proc = Process ( ) # qemu-usermode fail! if not proc . status : return files = dict ( proc . open_files ) for c in proc . connections : files [ c . fd ] = str ( c ) print ( "%-10s %s" % ( "pid" , proc . pid ) ) print ( "%-10s %s" % ( "tid" , proc . tid ) ) if proc . selinux != 'unconfined' : print ( "%-10s %s" % ( "selinux" , proc . selinux ) ) print ( "%-10s %s" % ( "ppid" , proc . ppid ) ) if not pwndbg . android . is_android ( ) : print ( "%-10s %s" % ( "uid" , proc . uid ) ) print ( "%-10s %s" % ( "gid" , proc . gid ) ) print ( "%-10s %s" % ( "groups" , proc . groups ) ) else : print ( "%-10s %s" % ( "uid" , list ( map ( pwndbg . android . aid_name , proc . uid ) ) ) ) print ( "%-10s %s" % ( "gid" , list ( map ( pwndbg . android . aid_name , proc . gid ) ) ) ) print ( "%-10s %s" % ( "groups" , list ( map ( pwndbg . android . aid_name , proc . groups ) ) ) ) for fd , path in files . items ( ) : if not set ( path ) < set ( string . printable ) : path = repr ( path ) print ( "%-10s %s" % ( "fd[%i]" % fd , path ) ) return