parameters: (executable)
return_statement: return (arch,bits)
docstring: Get PE DllCharacteristics bits.
      Returns a tuple (arch,bits) where arch is 'i386:x86-64' or 'i386'
      and bits is the DllCharacteristics value.
docstring_summary: Get PE DllCharacteristics bits.
      Returns a tuple (arch,bits) where arch is 'i386:x86-64' or 'i386'
      and bits is the DllCharacteristics value.
docstring_tokens: Get PE DllCharacteristics bits . Returns a tuple ( arch bits ) where arch is i386 : x86 - 64 or i386 and bits is the DllCharacteristics value .
function: def get_PE_dll_characteristics(executable):
      '''
      Get PE DllCharacteristics bits.
      Returns a tuple (arch,bits) where arch is 'i386:x86-64' or 'i386'
      and bits is the DllCharacteristics value.
      '''
      p = subprocess.Popen([OBJDUMP_CMD, '-x',  executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True)
      (stdout, stderr) = p.communicate()
      if p.returncode:
          raise IOError('Error opening file')
      arch = ''
      bits = 0
      for line in stdout.splitlines():
          tokens = line.split()
          if len(tokens)>=2 and tokens[0] == 'architecture:':
              arch = tokens[1].rstrip(',')
          if len(tokens)>=2 and tokens[0] == 'DllCharacteristics':
              bits = int(tokens[1],16)
      return (arch,bits)
function_tokens: def get_PE_dll_characteristics ( executable ) : p = subprocess . Popen ( [ OBJDUMP_CMD , '-x' , executable ] , stdout = subprocess . PIPE , stderr = subprocess . PIPE , stdin = subprocess . PIPE , universal_newlines = True ) ( stdout , stderr ) = p . communicate ( ) if p . returncode : raise IOError ( 'Error opening file' ) arch = '' bits = 0 for line in stdout . splitlines ( ) : tokens = line . split ( ) if len ( tokens ) >= 2 and tokens [ 0 ] == 'architecture:' : arch = tokens [ 1 ] . rstrip ( ',' ) if len ( tokens ) >= 2 and tokens [ 0 ] == 'DllCharacteristics' : bits = int ( tokens [ 1 ] , 16 ) return ( arch , bits )