mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2024-12-27 09:22:19 +08:00
5 lines
No EOL
160 B
Python
5 lines
No EOL
160 B
Python
import os
|
|
import subprocess
|
|
try: status = subprocess.check_output("wg show wg0", shell=True)
|
|
except Exception: print("false")
|
|
else:print(status.decode("UTF-8")) |