欢迎各位来绕过这段小码,进行各种注入,节后放思路

joyhen 2015-09-23 05:03:11
string inputStr = "...你懂的....";
inputStr = inputStr.Replace("'", "");
string strwhere = "select * from tb where" + string.Format("kk='{0}'", inputStr);
...全文
291 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
Honest_Dr 2016-09-20
  • 打赏
  • 举报
回复
是把 . 替换掉吗
卖水果的net 2016-02-02
  • 打赏
  • 举报
回复
这么好的话题,怎么没有下文了?
xqchenxue2 2015-09-23
  • 打赏
  • 举报
回复
string inputStr = "...你懂的.... or 1=1"; inputStr = inputStr.Replace("'", ""); string strwhere = "select * from tb where" + string.Format("kk='{0}'", inputStr);
卖水果的net 2015-09-23
  • 打赏
  • 举报
回复
引用 1 楼 xqchenxue2 的回复:
tring inputStr = "...你懂的...."; inputStr = inputStr.Replace("'", "");把'号置为空 string strwhere = "select * from tb where" + string.Format("kk='{0}'", inputStr);//同strwhere = "select * from tb where" +inputStr;只是赋值而已;
不同,处理单引号,一种比较常见的防 SQL 注入的方法。
joyhen 2015-09-23
  • 打赏
  • 举报
回复
引用 1 楼 xqchenxue2 的回复:
tring inputStr = "...你懂的...."; inputStr = inputStr.Replace("'", "");把'号置为空 string strwhere = "select * from tb where" + string.Format("kk='{0}'", inputStr);//同strwhere = "select * from tb where" +inputStr;只是赋值而已;
你确定认真看了么
xqchenxue2 2015-09-23
  • 打赏
  • 举报
回复
tring inputStr = "...你懂的...."; inputStr = inputStr.Replace("'", "");把'号置为空 string strwhere = "select * from tb where" + string.Format("kk='{0}'", inputStr);//同strwhere = "select * from tb where" +inputStr;只是赋值而已;

22,300

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 疑难问题
社区管理员
  • 疑难问题社区
  • 尘觉
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧