可打包程序运行切换下一步实现突破cursor0.45

This commit is contained in:
huangzhenpc
2025-02-11 17:52:08 +08:00
parent e18297c3c0
commit 2b48478746
8 changed files with 538 additions and 69 deletions

View File

@@ -18,7 +18,7 @@ def test_member_status(machine_id: str):
}
print("\n发送请求...")
response = requests.post(endpoint, json=data, headers=headers, timeout=10)
response = requests.post(endpoint, json=data, headers=headers, timeout=10, verify=False)
print(f"状态码: {response.status_code}")
print("\n响应数据:")
@@ -43,6 +43,43 @@ def test_member_status(machine_id: str):
except Exception as e:
print(f"\n请求失败: {str(e)}")
def test_get_unused_account(machine_id: str):
"""测试获取未使用账号接口"""
print(f"\n=== 测试获取未使用账号 ===")
print(f"设备码: {machine_id}")
try:
# 构造请求
endpoint = "https://cursorapi.nosqli.com/admin/api.account/getUnused"
data = {
"machine_id": machine_id
}
headers = {
"Content-Type": "application/json"
}
print("\n发送请求...")
response = requests.post(endpoint, json=data, headers=headers, timeout=30, verify=False)
print(f"状态码: {response.status_code}")
print("\n响应数据:")
response_data = response.json()
print(json.dumps(response_data, indent=2, ensure_ascii=False))
if response_data.get("code") == 200:
account_data = response_data.get("data", {})
print("\n账号信息:")
print(f"邮箱: {account_data.get('email', '')}")
print(f"到期时间: {account_data.get('expire_time', '')}")
print(f"剩余天数: {account_data.get('days_left', 0)}")
except Exception as e:
print(f"\n请求失败: {str(e)}")
if __name__ == "__main__":
# 禁用SSL警告
requests.packages.urllib3.disable_warnings()
machine_id = "b2c32bdeff8d3f0d33dc88f2aadea6bc"
test_member_status(machine_id)
test_member_status(machine_id)
test_get_unused_account(machine_id)