()
return 0
Return the address of the entry point for the main executable.
Return the address of the entry point for the main executable.
Return the address of the entry point for the main executable .
def entry():
    """
    Return the address of the entry point for the main executable.
    """
    entry = pwndbg.auxv.get().AT_ENTRY
    if entry:
        return entry

    # Looking for this line:
    # Entry point: 0x400090
    for line in pwndbg.info.files().splitlines():
        if "Entry point" in line:
            entry_point = int(line.split()[-1], 16)

            # PIE entry points are sometimes reported as an
            # offset from the module base.
            if entry_point < 0x10000:
                break

            return entry_point

    # Try common names
    for name in ['_start', 'start', '__start', 'main']:
        try:
            return pwndbg.symbol.address(name)
        except gdb.error:
            pass

    # Can't find it, give up.
    return 0
def entry ( ) : entry = pwndbg . auxv . get ( ) . AT_ENTRY if entry : return entry # Looking for this line: # Entry point: 0x400090 for line in pwndbg . info . files ( ) . splitlines ( ) : if "Entry point" in line : entry_point = int ( line . split ( ) [ - 1 ] , 16 ) # PIE entry points are sometimes reported as an # offset from the module base. if entry_point < 0x10000 : break return entry_point # Try common names for name in [ '_start' , 'start' , '__start' , 'main' ] : try : return pwndbg . symbol . address ( name ) except gdb . error : pass # Can't find it, give up. return 0