资源简介
漏洞资源 找了挺久 分享给各位 主要在xp机中构建一个有漏洞的网页app
代码片段和文件信息
using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Web;
public partial class _Default : System.Web.UI.Page
{
protected SqlConnection objConn = new SqlConnection(ConfigurationManager.ConnectionStrings[“test“].ToString());
protected string conn = ““;
protected void Page_Load(object sender EventArgs e)
{
if((Request.QueryString[“login“] != null) &&
(Request.QueryString[“password“] != null))
{
Response.Write(Request.QueryString[“login“].ToString() + Request.QueryString[“password“].ToString());
conn = “SELECT first_name + ‘ ‘ + last_name + ‘ ‘ + middle_name FROM users WHERE username = ‘“ + Request.QueryString[“login“] + “‘ “ +
“AND password = ‘“ + Request.QueryString[“password“] + “‘“;
Login();
}
}
public void btnSubmit_Clicked(object o EventArgs e)
{
lblErrorMessage.Text = ““;
lblErrorMessage.Visible = false;
if (txtLogin.Text == ““)
{
lblErrorMessage.Text = “Missing user name...
“;
lblErrorMessage.Visible = true;
}
else
{
if (txtPassword.Text == ““)
{
lblErrorMessage.Text = “Missing password!
“;
lblErrorMessage.Visible = true;
}
else
{
conn = “SELECT first_name + ‘ ‘ + last_name + ‘ ‘ + middle_name FROM users WHERE username = ‘“ + txtLogin.Text + “‘ “ +
“AND password = ‘“ + txtPassword.Text + “‘“;
Login();
}
}
}
private void Login()
{
SqlCommand cmd = new SqlCommand(conn objConn);
objConn.Open();
if (cmd.ExecuteScalar() != DBNull.Value)
{
if (Convert.ToString(cmd.ExecuteScalar()) != ““)
{
lblErrorMessage.Text = “Sucessfully logged in!“;
lblErrorMessage.Visible = true;
pnlLogin.Visible = false;
pnlChatterBox.Visible = true;
}
else
{
lblErrorMessage.Text = “Invalid stuff“;
lblErrorMessage.Visible = true;
}
}
else
{
lblErrorMessage.Text = “Invalid User“;
lblErrorMessage.Visible = true;
}
objConn.Close();
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-03-07 20:53 nostarch1\
文件 233249 2010-03-03 08:05 nostarch1\back.jpg
目录 0 2013-03-07 20:53 __MACOSX\
目录 0 2013-03-07 20:53 __MACOSX\nostarch1\
文件 263 2010-03-03 08:05 __MACOSX\nostarch1\._back.jpg
文件 2154 2011-07-17 08:04 nostarch1\Default.aspx
文件 314 2011-07-17 08:04 __MACOSX\nostarch1\._Default.aspx
文件 1866 2013-03-07 20:53 nostarch1\Default.aspx.cs
文件 82 2013-03-07 20:53 __MACOSX\nostarch1\._Default.aspx.cs
文件 4888 2010-03-03 08:28 nostarch1\submit.png
文件 263 2010-03-03 08:28 __MACOSX\nostarch1\._submit.png
文件 294 2013-03-07 20:52 nostarch1\web.config
文件 82 2013-03-07 20:52 __MACOSX\nostarch1\._web.config
文件 222 2013-03-07 20:53 __MACOSX\._nostarch1
- 上一篇:换行插件.rar
- 下一篇:华硕RX570 4g 猛禽 海力士颗粒原版BIOS
评论
共有 条评论