import time, os from datetime import datetime
# 连接ADSL def connect_ADSL(name,username,password): cmd_string = f'rasdial {name} {username} {password}' os.system(cmd_string) time.sleep(0.5)
# 断开ADSL def disconnect_ADSL(name): cmd_string = f'rasdial {name} /disconnect' os.system(cmd_string) time.sleep(0.5)
# 重连ADSL def reconnect_ADSL(name,username,password): disconnect_ADSL(name) connect_ADSL(name, username, password)
|