10 lines
219 B
Python
10 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()
|