控制sim卡
def control_sim(enable=True):
if enable:
command = "netsh interface set interface name=grantSim admin=enable"
subprocess.run(command, shell=True)
time.sleep(15)
else:
command = "netsh interface set interface name=grantSim admin=disable"
subprocess.run(command, shell=True, capture_output=True, text=True)
time.sleep(2)
def re_connect():
control_sim(enable=False)
control_sim(enable=True)
run as admin
浙公网安备 33010602011771号