软件编程 --- 发http包
# 时间 12:08 # "expires_in": 171205, import requests import json from datetime import datetime import time url = "https://jywgappthw.chinatowercom.cn:9000/workorder/bill/getBillList/" headers = { "Authorization": "Bearer 8758805f-cf24-4e43-ad8c-a661e76c206f", "User-Agent": "Mozilla/5.0 (Linux; Android 11; 2112123AC Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/92.0.4515.131 Mobile Safari/537.36 uni-app Html5Plus/1.0 (Immersed/24.0)", "Content-Type": "application/json", } payload = { "userId": "91c7750eadc144948ba558fc367c9c8d", "roleId": "0100070", "billType": "ACCEPT", "pageNumber": 1, "pageSize": 10, "billStatus": "", "areaId": "", "businessType": "", "beginTimeType": "", "cityId": "", "provId": "", "stationCode": "", "stationName": "", "deviceName": "", "deviceCode": "", "billSn": "" } while True: # Making the POST request response = requests.post(url, headers=headers, json=payload) # Writing response to a file timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S") with open("C://1.txt", "w") as file: file.write(f"Response Time: {timestamp}\n\n") file.write(f"Response Headers:\n{json.dumps(dict(response.headers), indent=2)}\n\n") file.write(f"Response Body:\n{json.dumps(response.json(), indent=2)}") # Introduce a delay (1 minute in this example) time.sleep(60)
免责声明
本文档所有内容仅供安全研究、学术交流与技术学习使用,严禁用于任何未经授权的逆向破解、网络攻击、隐私窃取、恶意软件开发及其他违反《中华人民共和国网络安全法》《数据安全法》等法律法规的行为,使用者应确保已获得目标软件权利人的合法授权并自行承担因使用本文档内容所产生的一切法律责任与后果,作者不对任何直接或间接损害承担任何责任,继续阅读即视为您已知悉并同意上述全部条款。
浙公网安备 33010602011771号