import requests

with open('/tmp/list.txt', 'r') as f: phoneNums = f.readlines()

for phoneNum in phoneNums: phoneNum = phoneNum.strip() url = 'http://192.168.136.199:8089/callrecord/transferFileRequestNumberDateRKThread' headers = {'Content-Type': 'application/json'} data = {'phoneNum': phoneNum, 'startTime': '2023-05-30 00:00:00', 'endTime': '2023-06-01 23:59:59'} response = requests.post(url, headers=headers, json=data) with open('result.log', 'a') as f: f.write(response.text

将以下shell脚本内容转换为python脚本#!binbashfor phoneNum in cat tmplisttxtdo curl http1921681361998089callrecordtransferFileRequestNumberDateRKThread -X POST -H Content-Typeapplicationjson --data phoneNum$phon

原文地址: http://www.cveoy.top/t/topic/f2RS 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录