如果我是一个集会,那么ildasm仍然拆解它是否正常?
好.我编写了一个HelloWorld类库,随后的dll名为NGenILDasmTest.dll. - >针对.Net fw 4.
从Vs 2010命令提示符开始,我做到了
gacutil -i NGenILDasmTest.dll
Run Code Online (Sandbox Code Playgroud)
我可以看到GAC中安装的程序集.我跑了ildasm所以我可以查看IL.到现在为止还挺好.
然后我跑了
ngen NGenILDasmTest.dll
Run Code Online (Sandbox Code Playgroud)
(我没有为ngen指定任何选项).这个程序集成功编译完成.我找到了名称为NGenILDasmTest.ni.dll的文件夹
C:\Windows\Assembly\NativeImages_v4.0.30319_32\NGenILDasmTest\81d49dd4c7df22fb3df530402b58ffc9
Run Code Online (Sandbox Code Playgroud)
现在,当我像下面一样运行ildasm时
ildasm "C:\Windows\Assembly\NativeImages_v4.0.30319_32\NGenILDasmTest\81d49dd4c7df22fb3df530402b58ffc9\NGenILDasmTest.ni.dll"
Run Code Online (Sandbox Code Playgroud)
我可以看到Ngen-ed组件的内容.这是正常的吗?
从技术上讲,Ngen为IL生成本机CPU插件(并且显然将其置于C:\ windows\Assembly\NAtiveImages_V4.##### _ 32 - 在我的情况下).如果是这种情况,我怎么能使用ILDasm将NGen-ed程序集看作IL?
请帮助我理解我在这里缺少的"小东西".
好.我正在处理在VBScript上编写的经典ASP应用程序.我试图过滤可能来自编码查询字符串的可能的XSS.
我有一个简单的XSS消除函数[getUserInput].这会查找像<> /'....这样的特殊字符,并用空格替换它们.这非常有效.
但是,当我输入通过Server.URLEncode(VBScript)或转义(Javascript)编码的内容时,显然我的上述过滤器不起作用.
我想知道推荐的解决方案,以防止这种Unicode转换输入使我的页面容易受到XSS的攻击.
Repro步骤:
<%
Response.Write getUserInput(Request("txt1")) + "<br/>"
Response.Write Server.URLEncode(getUserInput(Request("txt1"))) + "<br/>"
'the below line is where I am trying to decode and echo the input
Response.Write URLDecode2((getUserInput(Request("txt1")))) + "<br/>"
Response.Write "<br/>"
%>
<html>
Try any of the below two encoded strings in the input box and hit the button. </br></br>
alert('hi') </br>
%3Cscript%3Ealert%28%27hi%27%29%3C%2Fscript%3E <br/>
alert(document.cookie) </br>
%3Cscript%3Ealert%28document.cookie%29%3C%2Fscript%3E <br/>
</br>
<form method="get" name="form1" id="form1" action="#" onSubmit="CallOnLoad()">
<input type='text' name='txt1' id='txt1' />
<button name='btn' type='submit' id='btn'>Hitme</button>
</form>
</html> …Run Code Online (Sandbox Code Playgroud)