code: def _ipconfig_getnode():
      
      import os, re
      dirs = ['', r'c:\windows\system32', r'c:\winnt\system32']
      try:
          import ctypes
          buffer = ctypes.create_string_buffer(300)
          ctypes.windll.kernel32.GetSystemDirectoryA(buffer, 300)  # @UndefinedVariable
          dirs.insert(0, buffer.value.decode('mbcs'))
      except:
          pass
      for dir in dirs:
          try:
              pipe = os.popen(os.path.join(dir, 'ipconfig') + ' /all')
          except IOError:
              continue
          for line in pipe:
              value = line.split(':')[-1].strip().lower()
              if re.match('([0-9a-f][0-9a-f]-){5}[0-9a-f][0-9a-f]', value):
                  return int(value.replace('-', ''), 16)
docs: Get the hardware address on Windows by running ipconfig.exe.