parameters: (executable)
return_statement: return have_gnu_stack and not have_wx
docstring: Check that no sections are writable and executable (including the stack)
docstring_summary: Check that no sections are writable and executable (including the stack)
docstring_tokens: Check that no sections are writable and executable ( including the stack )
function: def check_ELF_NX(executable):
      '''
      Check that no sections are writable and executable (including the stack)
      '''
      have_wx = False
      have_gnu_stack = False
      for (typ, flags) in get_ELF_program_headers(executable):
          if typ == 'GNU_STACK':
              have_gnu_stack = True
          if 'W' in flags and 'E' in flags: # section is both writable and executable
              have_wx = True
      return have_gnu_stack and not have_wx
function_tokens: def check_ELF_NX ( executable ) : have_wx = False have_gnu_stack = False for ( typ , flags ) in get_ELF_program_headers ( executable ) : if typ == 'GNU_STACK' : have_gnu_stack = True if 'W' in flags and 'E' in flags : # section is both writable and executable have_wx = True return have_gnu_stack and not have_wx