批量跑性格测试小程序

今天微信群里好多人在发性格测试和动物的关系。

嗯,我就想测试一下这种准不准,测试发现每次答案一样结果都是不一样的。

于是用burpsuite抓微信小程序的数据包,为了跟女神的结果一样,repeater了好几次但是结果都和女神的不一样。写成python脚本批量跑

import requests
import json
import re
import threading

headers = {"Upgrade-Insecure-Requests":"1",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 11_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E216 MicroMessenger/6.6.6 NetType/WIFI Language/zh_CN",
"Referer": "http://cn.honeyrock.cn/f/570?872106=766326"}

cookies={"user_upload_image_url":"http://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTIjjClEzfibGMJahNw0f8tAzhY2HQj3Qs402QZuCxRziabh6pIsF6zbm5USjbrLK5wB7vBzMDibvMq3A/0",
         "Hm_lpvt_42f14c4cb295e9a87317bc116cf118f5":"1524645205", "Hm_lvt_42f14c4cb295e9a87317bc116cf118f5":"1524639161,1524642064,1524645205",
 "csrftoken":"ledfpAAquTP67cpGlC8qPHwWFVVc5qwf",
 "sessionid":"h7rnvepalnu6nc0pz1k1rxso2xzqqf6c"}

data = {"quiz_id":"570",
"user_choice_list":'{"3627":{"text":"LIAO"},"3628":{"url":"http://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTIjjClEzfibGMJahNw0f8tAzhY2HQj3Qs402QZuCxRziabh6pIsF6zbm5USjbrLK5wB7vBzMDibvMq3A/0"},"3629":{"id":12031},"3630":{"id":12035},"3631":{"id":12043},"3632":{"id":12053},"3633":{"id":12055},"3634":{"id":12057}}',
"timediff":"%5B%5D",
"user_id":"",
"csrfmiddlewaretoken":"ledfpAAquTP67cpGlC8qPHwWFVVc5qwf",
"fr_token":""}

proxies = {"http":"http://192.168.95.188:8080"}

def down_img(begin,end):
    for i in range(begin,end):
        r = requests.post("http://cn.honeyrock.cn/api/quiz/answer",headers=headers,cookies=cookies,data=data,proxies=proxies)
        print r.json()

        url = "http://cn.honeyrock.cn/f/"+r.json()['hashed_ids']+"/r/"+r.json()['fr_token']

        r2 = requests.get(url=url,headers=headers,cookies=cookies,proxies=proxies)

        html = r2.text
        pitcture = re.findall(r'<meta property="og:image" content="(.*?)" />',html,re.M)
        url_p = pitcture[0]
        response = requests.get(url_p,proxies=proxies)
        img = response.content
        with open('img/'+str(i)+'.jpg','wb') as f:
            f.write(img)
if __name__ == "__main__":
    threads = []
    for i in range(0,10):
        t = threads.append(threading.Thread(target=down_img,args=(i*10,(i+1)*10,)))
    for t in threads:
        t.setDaemon(True)
        t.start()
    t.join()
    print "finish all down img!!!"

终于刷到了


猜你喜欢

转载自blog.csdn.net/qq1124794084/article/details/80084445