9 lines
219 B
Python
9 lines
219 B
Python
import subprocess
|
|
|
|
|
|
def get_network_interfaces():
|
|
interfaces = str.split(subprocess.run(["ls", "/sys/class/net/"], capture_output=True, text=True).stdout, "\n")
|
|
return interfaces[:-1]
|
|
|
|
|
|
get_network_interfaces()
|