ADO学习笔记之注入漏洞与参数化查询 作为新手,在学习ADO程序时,使用 sql 语言查询数据时,很容易写类似如下代码: using (SqlConnection con = new SqlConnection(ConnectionString)) { string cmdText = "select Flag from UserLogin where UserName='@UserName' and UserPwd='@Password'"; cmdText.Replace(&quo…
Struts2学习笔记一结合Hibernate完成查询商品类别简单案例(工具IDEA) 1.jar包准备 Hibernate+Struts2 jar包 struts的jar比较多,可以从Struts官方提供的demo中拿到必要的jar就行. 在apps/struts2-blank项目下 2.数据库准备 /* Navicat MySQL Data Transfer Source Server : GaGa Source Server Version : 50549 Source Host : lo…
文件下载漏洞 漏洞代码: <% function download(f,n) on error resume next Set S=CreateObject("Adodb.Stream") S.Mode= S.Type= S.Open S.LoadFromFile(f) then Reaponse.status=" else Response.ContentType="application/octet-stream" Response.AddHea…
Dependency Injection ------------------------------------------------------------------------ ASP.NET services can be configured with the following lifetimes: Transient Transient lifetime services are created each time they are requested. This lifeti…
这一篇介绍了下面的内容: 查询object数组 查询强类型数组 查询泛型字典 查询字符串 SelectMany 索引 Distinct操作符 排序 嵌套查询 分组 组连接 内连接 左外连接 交叉连接 skip,take 详细请参看代码. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.…
using CUBRID.Data.CUBRIDClient; namespace DataSetExample { class Program { static void Main(string[] args) { CUBRIDConnectionStringBuilder sb = new CUBRIDConnectionStringBuilder("localhost", "demodb&qu…