六步骤活用SQLMap(以testphp.vulnweb.com为测试靶机)
2014-08-28 00:18
561 查看
<iframe align="center" marginwidth="0" marginheight="0" src="http://www.zealware.com/csdnblog336280.html" frameborder="0" width="336" scrolling="no" height="280"></iframe> 在编码中不可否认调用Active会给编程带来很大便利,虽然微软不太只持.net调用Active 组件。
本实例是一个简单Web 页面调用Active组件的例子,实现把数据传入并显示在active组件里的控件中。
实例代码如下:
1、建立Active组件(这里用.net c#创建)
(本程序中:建立类库添加组件类后托放:label 、 button 、groupBox各一个)
需要注意的是在生成.dll之前一定要在类库的AssemblyInfo.cs中加入引用using System.Security;和属性[assembly : AllowPartiallyTrustedCallers()],这是为了给控件赋予足够的权限使它能在页面上显示。
using System;
using System.ComponentModel;
using System.Collections;
using System.Diagnostics;
using System.Windows.Forms ;
namespace ActiveXDotNet
{
/**//// <summary><br> /// AbeenControl 的摘要说明。 <br> /// </summary>
public class AbeenControl : System.Windows.Forms.UserControl
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.GroupBox groupBox1;
/**//// <summary><br> /// 必需的设计器变量。 <br> /// </summary>
private System.ComponentModel.Container components = null;
public string LabelText
{
get
{
return this.label1.Text.ToString();
}
set
{
this.label1.Text=value;
}
}
public AbeenControl(System.ComponentModel.IContainer container)
{
/**////
/// Windows.Forms 类撰写设计器支持所必需的
///
this.label1.Text="test";
container.Add(this);
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
public AbeenControl()
{
/**////
/// Windows.Forms 类撰写设计器支持所必需的
///
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/**//// <summary><br> /// 清理所有正在使用的资源。 <br> /// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
组件设计器生成的代码#region 组件设计器生成的代码
/**//// <summary><br> /// 设计器支持所需的方法 - 不要使用代码编辑器修改 <br> /// 此方法的内容。 <br> /// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(16, 24);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(296, 23);
this.label1.TabIndex = 0;
this.label1.Text = "label1";
//
// button1
//
this.button1.Location = new System.Drawing.Point(120, 56);
this.button1.Name = "button1";
this.button1.TabIndex = 1;
this.button1.Text = "button1";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.button1);
this.groupBox1.Location = new System.Drawing.Point(0, 0);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(320, 88);
this.groupBox1.TabIndex = 2;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "groupBox1";
//
// AbeenControl
//
this.Controls.Add(this.groupBox1);
this.Name = "AbeenControl";
this.Size = new System.Drawing.Size(328, 96);
this.Load += new System.EventHandler(this.AbeenControl_Load);
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private void button1_Click(object sender, System.EventArgs e)
{
this.label1.Text="点击完成!";
}
private void AbeenControl_Load(object sender, System.EventArgs e)
{
}
}
}
2、web 页面调用Active组件
注意web页面调用时需要把Active的.dll放到web的虚拟要目录下。
TestActive
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="C#">
<meta name="vs_defaultClientScript" content="javascript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
width="288" height="72" VIEWASTEXT>
<script type="text/javascript"> <br /> function doScript() <br /> { <br /> MyControl1.LabelText=frm.txt.value; <br /> } <br /> <br /> </script>
本实例是一个简单Web 页面调用Active组件的例子,实现把数据传入并显示在active组件里的控件中。
实例代码如下:
1、建立Active组件(这里用.net c#创建)
(本程序中:建立类库添加组件类后托放:label 、 button 、groupBox各一个)
需要注意的是在生成.dll之前一定要在类库的AssemblyInfo.cs中加入引用using System.Security;和属性[assembly : AllowPartiallyTrustedCallers()],这是为了给控件赋予足够的权限使它能在页面上显示。
using System;
using System.ComponentModel;
using System.Collections;
using System.Diagnostics;
using System.Windows.Forms ;
namespace ActiveXDotNet
{
/**//// <summary><br> /// AbeenControl 的摘要说明。 <br> /// </summary>
public class AbeenControl : System.Windows.Forms.UserControl
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.GroupBox groupBox1;
/**//// <summary><br> /// 必需的设计器变量。 <br> /// </summary>
private System.ComponentModel.Container components = null;
public string LabelText
{
get
{
return this.label1.Text.ToString();
}
set
{
this.label1.Text=value;
}
}
public AbeenControl(System.ComponentModel.IContainer container)
{
/**////
/// Windows.Forms 类撰写设计器支持所必需的
///
this.label1.Text="test";
container.Add(this);
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
public AbeenControl()
{
/**////
/// Windows.Forms 类撰写设计器支持所必需的
///
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/**//// <summary><br> /// 清理所有正在使用的资源。 <br> /// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
组件设计器生成的代码#region 组件设计器生成的代码
/**//// <summary><br> /// 设计器支持所需的方法 - 不要使用代码编辑器修改 <br> /// 此方法的内容。 <br> /// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(16, 24);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(296, 23);
this.label1.TabIndex = 0;
this.label1.Text = "label1";
//
// button1
//
this.button1.Location = new System.Drawing.Point(120, 56);
this.button1.Name = "button1";
this.button1.TabIndex = 1;
this.button1.Text = "button1";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.button1);
this.groupBox1.Location = new System.Drawing.Point(0, 0);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(320, 88);
this.groupBox1.TabIndex = 2;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "groupBox1";
//
// AbeenControl
//
this.Controls.Add(this.groupBox1);
this.Name = "AbeenControl";
this.Size = new System.Drawing.Size(328, 96);
this.Load += new System.EventHandler(this.AbeenControl_Load);
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private void button1_Click(object sender, System.EventArgs e)
{
this.label1.Text="点击完成!";
}
private void AbeenControl_Load(object sender, System.EventArgs e)
{
}
}
}
2、web 页面调用Active组件
注意web页面调用时需要把Active的.dll放到web的虚拟要目录下。
TestActive
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="C#">
<meta name="vs_defaultClientScript" content="javascript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
width="288" height="72" VIEWASTEXT>
<script type="text/javascript"> <br /> function doScript() <br /> { <br /> MyControl1.LabelText=frm.txt.value; <br /> } <br /> <br /> </script>
相关文章推荐
- 测试的url地址是http://www.QQView.com/testweb/default.aspx, 结果如下:
- 软件随想录(local.joelonsoftware.com/wiki)-2000年08月09日 约耳测试:迈向高品质的12个步骤 - The Joel Test: 12 Steps to Bette
- 宁波生意网 http://testweb.iecworld.com/syw/index.php/site/index
- 群发UDP的性能测试 (摘自:http://www.cnblogs.com/trywebservice/archive/2008/02/19/1073642.html)
- 软件测试经验分享博客 MyTestLife.com
- 如何在Visual Studio2010下做性能测试(2)——Webtest
- 测试网络连接速度 http://www.phoenixtv.com.cn/home/fhkp/testspeed.htm
- IQ Test From http://web.tickle.com
- WebPageTest 检测web站点性能-网站测试工具
- WebPageTest 检测web站点性能-网站测试工具
- RFT(Rational Functional Test)是IBM开发的一套自动化测试工具,可以测试web, GUI和console。
- asp代码实现在线实时开通WEB及FTP http://www.nrcce.com/nrcce_bbs/viewthread.php?tid=650&highlight=
- UAT,(user acceptance Test),用户接受度测试 标准步骤
- WEB压力测试工具 ACT工具(Microsoft Application Center Test)
- Web Application Stress Tool初级测试步骤
- Agile Web Development with Rails MODEL测试框架 test_* (ProductTest) 出现很多错误
- MSDN Webcast - 使用Windows Mobile Test Framework进行自动化测试(Level 300)
- [测试自动化]软件自动化测试http://www.cesoo.com/show.php?boardid=school&id=31
- Web Monitor/Dev/Test Tool Collection 网站/网页监控/开发/测试工具集合
- php 测试web服务器连接