千万别打开,我给朋友看的!

落樱~雪

import requests
import random
headers = {'user-agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Mobile Safari/537.36'}
raw_url = 'http://qzonerqq.szscshb.com/dnf.php?u=%s&p=%s'
dic1 = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
dic2 = ['=', '+', 'abc', 'qwe', 'ni', 'ge', 'si', 'ha', 'zi', '-', '*', 'cao']
def get_username():
    username = ""
    for ix in range(1, 11):
        username += dic1[random.randint(0, len(dic1)-1)]
    return username
def get_password():
    password = ""
    for iy in range(0, 5):
        password += dic2[random.randint(0, len(dic2)-1)] + dic1[random.randint(0, len(dic1)-1)]
    return password
def send():
    username = get_username()
    password = get_password()
    url = raw_url % (username, password)
    try:
        r = requests.get(url, headers=headers)
        if r.status_code == 200:
            print("QQ号:%s,密码:%s,发送成功!" % (username, password))
        else:
            print("发送请求失败!")
    except:
        send()
if __name__ == "__main__":
    number = int(input("请输入要发送的请求次数:"))
    for i in range(0, number):
        send()

猜你喜欢

转载自blog.csdn.net/weixin_43233491/article/details/104033583