发布网友 发布时间:2022-06-11 21:15
共1个回答
热心网友 时间:2024-11-08 15:12
head={'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36', 'Content-Type':'application/xml;charset=utf-8','Accept-Encoding':'gzip,deflate,sdch', 'Accept-Language':'zh-CN,zh;q=0.8', 'X-Requested-With':'XMLHttpRequest'}ip_add='http://'+ipuser='admin'passwd='1'data="""xxx............."""p=requests.put(ip_add,headers= head,auth=(user, passwd),data=data)print p.status_code