ifcfg.py 315 B

123456789
  1. import subprocess
  2. n = 1
  3. config = subprocess.check_output(
  4. ['chcp', '65001', '&', 'netsh', 'interface', 'ipv4', 'show', 'config'], shell=True)
  5. while n != 10:
  6. check = config.decode('utf-8').split('Configuration for interface "Беспроводная сеть"')[1].split('\n')[n]
  7. print(check)
  8. n += 1