如何使用Web服务使用C#在asp.net中进行Xml注入? [英] how to do the Xml Injection in asp.net using c# using webservice?

查看:118
本文介绍了如何使用Web服务使用C#在asp.net中进行Xml注入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都了解xml注入,请尽快解释一个有关xml注入的示例.我在google中搜索我做了一个例子,但想验证我不知道的输入吗?

在此先感谢

any one know about xml injection, please explain about xml injection with one sample coding asap. i search in google i do one example but hoe to validate the input i dont know?

thanks in advance

推荐答案

XmlNode Xmlnode;
XmlDocument doc =新的XmlDocument();
doc.Load(Server.MapPath("your xml file"));
Xmlnode = root.SelectSingleNode(@"//users/savings [LoginID/text()=''" + UName +和passwd/text()=''" + Pwd +'']/cardno/text() );

输入:

给出
< b>用户名:< b>''或1 = 1</b>
密码:test123正确给出.</b>


Xml注入类似于sql Injection
XmlNode Xmlnode;
XmlDocument doc = new XmlDocument();
doc.Load(Server.MapPath("your xml file"));
Xmlnode = root.SelectSingleNode(@"//users/savings[LoginID/text()='' " + UName + " and passwd/text()='' " + Pwd + " '']/cardno/text()");

Input:

give the
<b>user name : <b>'' or 1=1</b>
password : test123 given correctly.</b>


Xml injection is simillar like sql Injection


这篇关于如何使用Web服务使用C#在asp.net中进行Xml注入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆