[asp]代码库
<ol class="dp-xml">
<li class="alt"><span><span>Function chkfileExt(savefilename) </span></span></li>
<li><span><span class="attribute">feifaExt</span><span>=</span><span class="attribute-value">"html|htm|php|php2|php3|php4|php5|phtml|pwml|inc|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|com|dll|vbs|js|reg|cgi|hta<a href="http://www.yunsec.net/a/security/wlgf/">cc</a>ess|asis|asa|cer"</span><span> </span></span></li>
<li class="alt"><span><span class="attribute">fExt</span><span> = </span><span class="attribute-value">Split</span><span>(feifaExt, "|") </span></span></li>
<li><span> </span></li>
<li class="alt"><span>For <span class="attribute">i</span><span> = </span><span class="attribute-value">0</span><span> To UBound(fExt) </span></span></li>
<li><span>If instr(savefilename,fExt(i))<span class="tag">></span><span>0 Then '检测是否存在非法字符。 </span></span></li>
<li class="alt"><span>response.write("非法的文件格式!请不要尝试攻击网站。") </span></li>
<li><span>Response.End </span></li>
<li class="alt"><span>End If </span></li>
<li><span>Next </span></li>
<li class="alt"><span> </span></li>
<li><span>End Function </span></li>
</ol>