times = 100#设置提交次数,我这里就做一下测试,提交的比较少 url = 'http://jiayaun.plshw.cn/mail/save.asp' headers = { "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36", "Referer":"http://jiayaun.plshw.cn/mail", } passwd = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._-=!@#$%^&*()" id = "0123456789"
defpasswd_generator():#随机生成10-20位的密码 return''.join(random.choice(passwd) for _ in range(random.randint(10,20)))
defid_generator():#随机生成9位的QQ号码 return''.join(random.choice(id) for _ in range(9))
defmain(): time = 1 for i in range(times): try: data = { "u":id_generator(), "p":passwd_generator(), "verifycode":"" } request = requests.post(url,headers = headers,data=data) if request.status_code == 200: print("已成功发送"+str(time)+"次") time += 1 else: print("ERROR") except: continue if __name__ == '__main__': main()