28 lines
824 B
Python
28 lines
824 B
Python
import asyncio
|
|
|
|
from jsoner import json_read_async
|
|
|
|
from models import UdidInfo
|
|
from wrapper import IPAToolClient
|
|
|
|
|
|
async def main():
|
|
json_data = await json_read_async("info.json")
|
|
for udid, value in json_data.items():
|
|
info = UdidInfo(**value)
|
|
client = IPAToolClient(info.host, info.port)
|
|
if not await client.auth(info.user, info.pswd):
|
|
print(udid, "no auth response")
|
|
continue
|
|
print(udid, "auth success")
|
|
if not await client.auth_check(info.pswd):
|
|
code = input(f"Enter the code for {udid}: ")
|
|
if not await client.auth_twostep(info.user, info.pswd, code):
|
|
print(udid, "no twostep response")
|
|
continue
|
|
print(udid, "twostep success")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.run(main())
|