騰訊SRC挖掘信息收集小腳本


騰訊sso.qq.com接口獲取騰訊旗下域名資產


# -*- coding:utf-8 -*-
import requests
import time
import re
header ={
'Connection': 'close',
'Accept': 'application/json, text/plain, */*',
'Accept - Encoding':'gzip, deflate',
'Accept-Language':'zh-CN,zh;q=0.9',
'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36'
}
f = open('url.txt','w',encoding = 'UTF-8')
for i in range(10000,50000):
try:
url = "https://sso.qq.com/open/appinfo?app={}".format(i)
get = requests.get(url = url,headers = header,timeout=1)
except:
pass
#time.sleep(2)
reSponse = get.text
info = re.findall('"PortalUrl":"(.*?)"',reSponse)
print("寫入的url為:",info)
f.writelines(info)
f.writelines('\n')
#print(f)
f.close()


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM