Hexonet ISP API
ispapi的Python项目详细描述
这是Hexonet ISPAPI 2.2的克隆。
安装ISPAPI
pip install ispapi
# Import the ispapi libraryimportispapi# Create a connection with the URL, entity, login and password# Use "1234" as entity for the OT&E, and "54cd" for productive use# Don't have a HEXONET Account yet? Get one here: www.hexonet.net/sign-upapi=ispapi.connect(url='https://coreapi.1api.net/api/call.cgi',entity='1234',login='test.user',password='test.passw0rd')# Call a commandresponse=api.call({'Command':"QueryDomainList",'limit':5})# Display the result in the format you wantres=response.as_list()res=response.as_list_hash()res=response.as_hash()# Get the response code and the response descriptioncode=response.code()description=response.description()