[SQL注入检查工具]编写代码(一) --读取网页信息类
来源:互联网 发布:软件控制上网 编辑:程序博客网 时间:2024/05/22 04:50
这几天接了个私活,也用到的读取网页的信息,就构造了下面两个类,这个两个类也可以用于SQL注入检查工具这个项目里,所以放这里也刚刚好,注释的我都写了,可是用法我暂时不写了,以后用到就明白了
1、构造了一个web地址类,
2、构造了一个得到页面数据和图片的类
/**//// <summary>
/// 页面连接信息类
/// </summary>
public class CWebUrlInfo
...{
private string _WebUrl = "";//地址
/**//// <summary>
/// 地址,包含GET连接数据
/// </summary>
public string WebUrl
...{
get ...{ return _WebUrl; }
set ...{ _WebUrl = value; }
}
private string _Accept = "*/*"; //访问类型,默认*/*
/**//// <summary>
/// 访问类型,默认*/*
/// </summary>
public string Accept
...{
get ...{ return _Accept; }
set ...{ _Accept = value; }
}
private string _RefererUrl = "";//引用地址
/**//// <summary>
/// 引用地址
/// </summary>
public string RefererUrl
...{
get ...{ return _RefererUrl; }
set ...{ _RefererUrl = value; }
}
private string _ContentType = "application/x-www-form-urlencoded";//文件种类
/**//// <summary>
/// 文件种类
/// </summary>
public string ContentType
...{
get ...{ return _ContentType; }
set ...{ _ContentType = value; }
}
private string _UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon)"; //客户端信息,默认IE6
/**//// <summary>
/// 客户端信息,默认IE6
/// </summary>
public string UserAgent
...{
get ...{ return _UserAgent; }
set ...{ _UserAgent = value; }
}
private bool _KeepAlive = true; //是否保持连接状态
/**//// <summary>
/// 是否保持连接状态
/// </summary>
public bool KeepAlive
...{
get ...{ return _KeepAlive; }
set ...{ _KeepAlive = value; }
}
private CookieContainer _CookieContainer = new CookieContainer(); //cookie数据
/**//// <summary>
/// cookie数据
/// </summary>
public CookieContainer CookieContainer
...{
get ...{ return _CookieContainer; }
set ...{ _CookieContainer = value; }
}
private bool _AllowAutoRedirec = false; //是否自动跳转
/**//// <summary>
/// 是否自动跳转
/// </summary>
public bool AllowAutoRedirec
...{
get ...{ return _AllowAutoRedirec; }
set ...{ _AllowAutoRedirec = value; }
}
}
/// 页面连接信息类
/// </summary>
public class CWebUrlInfo
...{
private string _WebUrl = "";//地址
/**//// <summary>
/// 地址,包含GET连接数据
/// </summary>
public string WebUrl
...{
get ...{ return _WebUrl; }
set ...{ _WebUrl = value; }
}
private string _Accept = "*/*"; //访问类型,默认*/*
/**//// <summary>
/// 访问类型,默认*/*
/// </summary>
public string Accept
...{
get ...{ return _Accept; }
set ...{ _Accept = value; }
}
private string _RefererUrl = "";//引用地址
/**//// <summary>
/// 引用地址
/// </summary>
public string RefererUrl
...{
get ...{ return _RefererUrl; }
set ...{ _RefererUrl = value; }
}
private string _ContentType = "application/x-www-form-urlencoded";//文件种类
/**//// <summary>
/// 文件种类
/// </summary>
public string ContentType
...{
get ...{ return _ContentType; }
set ...{ _ContentType = value; }
}
private string _UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon)"; //客户端信息,默认IE6
/**//// <summary>
/// 客户端信息,默认IE6
/// </summary>
public string UserAgent
...{
get ...{ return _UserAgent; }
set ...{ _UserAgent = value; }
}
private bool _KeepAlive = true; //是否保持连接状态
/**//// <summary>
/// 是否保持连接状态
/// </summary>
public bool KeepAlive
...{
get ...{ return _KeepAlive; }
set ...{ _KeepAlive = value; }
}
private CookieContainer _CookieContainer = new CookieContainer(); //cookie数据
/**//// <summary>
/// cookie数据
/// </summary>
public CookieContainer CookieContainer
...{
get ...{ return _CookieContainer; }
set ...{ _CookieContainer = value; }
}
private bool _AllowAutoRedirec = false; //是否自动跳转
/**//// <summary>
/// 是否自动跳转
/// </summary>
public bool AllowAutoRedirec
...{
get ...{ return _AllowAutoRedirec; }
set ...{ _AllowAutoRedirec = value; }
}
}
/**//// <summary>
/// 页面连接信息类
/// </summary>
public class CWebUrlInfo
...{
private string _WebUrl = "";//地址
/**//// <summary>
/// 地址,包含GET连接数据
/// </summary>
public string WebUrl
...{
get ...{ return _WebUrl; }
set ...{ _WebUrl = value; }
}
private string _Accept = "*/*"; //访问类型,默认*/*
/**//// <summary>
/// 访问类型,默认*/*
/// </summary>
public string Accept
...{
get ...{ return _Accept; }
set ...{ _Accept = value; }
}
private string _RefererUrl = "";//引用地址
/**//// <summary>
/// 引用地址
/// </summary>
public string RefererUrl
...{
get ...{ return _RefererUrl; }
set ...{ _RefererUrl = value; }
}
private string _ContentType = "application/x-www-form-urlencoded";//文件种类
/**//// <summary>
/// 文件种类
/// </summary>
public string ContentType
...{
get ...{ return _ContentType; }
set ...{ _ContentType = value; }
}
private string _UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon)"; //客户端信息,默认IE6
/**//// <summary>
/// 客户端信息,默认IE6
/// </summary>
public string UserAgent
...{
get ...{ return _UserAgent; }
set ...{ _UserAgent = value; }
}
private bool _KeepAlive = true; //是否保持连接状态
/**//// <summary>
/// 是否保持连接状态
/// </summary>
public bool KeepAlive
...{
get ...{ return _KeepAlive; }
set ...{ _KeepAlive = value; }
}
private CookieContainer _CookieContainer = new CookieContainer(); //cookie数据
/**//// <summary>
/// cookie数据
/// </summary>
public CookieContainer CookieContainer
...{
get ...{ return _CookieContainer; }
set ...{ _CookieContainer = value; }
}
private bool _AllowAutoRedirec = false; //是否自动跳转
/**//// <summary>
/// 是否自动跳转
/// </summary>
public bool AllowAutoRedirec
...{
get ...{ return _AllowAutoRedirec; }
set ...{ _AllowAutoRedirec = value; }
}
}
/// 页面连接信息类
/// </summary>
public class CWebUrlInfo
...{
private string _WebUrl = "";//地址
/**//// <summary>
/// 地址,包含GET连接数据
/// </summary>
public string WebUrl
...{
get ...{ return _WebUrl; }
set ...{ _WebUrl = value; }
}
private string _Accept = "*/*"; //访问类型,默认*/*
/**//// <summary>
/// 访问类型,默认*/*
/// </summary>
public string Accept
...{
get ...{ return _Accept; }
set ...{ _Accept = value; }
}
private string _RefererUrl = "";//引用地址
/**//// <summary>
/// 引用地址
/// </summary>
public string RefererUrl
...{
get ...{ return _RefererUrl; }
set ...{ _RefererUrl = value; }
}
private string _ContentType = "application/x-www-form-urlencoded";//文件种类
/**//// <summary>
/// 文件种类
/// </summary>
public string ContentType
...{
get ...{ return _ContentType; }
set ...{ _ContentType = value; }
}
private string _UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon)"; //客户端信息,默认IE6
/**//// <summary>
/// 客户端信息,默认IE6
/// </summary>
public string UserAgent
...{
get ...{ return _UserAgent; }
set ...{ _UserAgent = value; }
}
private bool _KeepAlive = true; //是否保持连接状态
/**//// <summary>
/// 是否保持连接状态
/// </summary>
public bool KeepAlive
...{
get ...{ return _KeepAlive; }
set ...{ _KeepAlive = value; }
}
private CookieContainer _CookieContainer = new CookieContainer(); //cookie数据
/**//// <summary>
/// cookie数据
/// </summary>
public CookieContainer CookieContainer
...{
get ...{ return _CookieContainer; }
set ...{ _CookieContainer = value; }
}
private bool _AllowAutoRedirec = false; //是否自动跳转
/**//// <summary>
/// 是否自动跳转
/// </summary>
public bool AllowAutoRedirec
...{
get ...{ return _AllowAutoRedirec; }
set ...{ _AllowAutoRedirec = value; }
}
}
- [SQL注入检查工具]编写代码(一) --读取网页信息类
- [SQL注入检查工具]产品设计(一)
- [SQL注入检查工具]产品设想
- [SQL注入检查工具]产品需求
- [SQL注入检查工具]产品设计(二)
- [SQL注入检查工具]产品设计(三)
- [SQL注入检查工具]产品设计(四)
- 一些代码检查工具的信息
- ASP网页防SQL注入的代码
- 静态代码检查工具PC-Lint(一)
- 静态代码检查工具PC-Lint(一)
- 静态代码检查工具PC-Lint(一)
- 静态代码检查工具PC-Lint(一)
- 静态代码检查工具PC-Lint(一)
- 静态代码检查工具PC-Lint(一)
- SQL SERVER 注入检查
- 网页错误检查工具
- Visual Studio 中的代码或网页的拼写检查工具
- 数字水印嵌入的matlab程序
- qt4:windows下安装qt4及编译mysql5驱动程序全过程
- .NET 的 Lucene
- PHP - Manual手册 - V. Array 数组函数 - array_merge合并一个或多个数组
- ASP.NET(页面传值)
- [SQL注入检查工具]编写代码(一) --读取网页信息类
- xp 终极优化(呕心沥血版)
- PHP - Manual手册 - CXLIX. Session 会话处理函数 - session.use_only_cookies指定是否在客户端仅仅使用 cookie 来存放会话 ID
- java字符串解惑
- CGI HTML TEMPLATE
- 还是作业--关于CDMA
- 某公司劳动法
- 一款php后门 phpspy的情况
- vista下权限提升