·ÅÈëconn.aspÖÐ(¾Ü¾ø¹¥»÷ ÍòÄÜAsp·À×¢Èë´úÂë)
·ÅÈëconn.aspÖÐ(¾Ü¾ø¹¥»÷ ÍòÄÜAsp·À×¢Èë´úÂë)
·ÅÈëconn.aspÖÐ(¾Ü¾ø¹¥»÷ ÍòÄÜAsp·À×¢Èë´úÂë)
µÚÒ»ÖÖ£º
squery=lcase(Request.ServerVariables("QUERY_STRING"))
sURL=lcase(Request.ServerVariables("HTTP_HOST"))
SQL_injdata =":|;|>|<|--|sp_|xp_|\|dir|cmd|^|(|)|+|$|'|copy|format|and|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare"
SQL_inj = split(SQL_Injdata,"|")
For SQL_Data=0 To Ubound(SQL_inj)
if instr(squery&sURL,Sql_Inj(Sql_DATA))>0 Then
Response.Write "SQL·À×¢Èëϵͳ"
Response.end
end if
next
µÚ¶þÖÖ£º
SQL_injdata =":|;|>|<|--|sp_|xp_|\|dir|cmd|^|(|)|+|$|'|copy|format|and|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare"
SQL_inj = split(SQL_Injdata,"|")
If Request.QueryString<>"" Then
For Each SQL_Get In Request.QueryString
For SQL_Data=0 To Ubound(SQL_inj)
if instr(Request.QueryString(SQL_Get),Sql_Inj(Sql_DATA))>0 Then
Response.Write "SQLͨÓ÷À×¢Èëϵͳ"
Response.end
end if
next
Next
End If
If Request.Form<>"" Then
For Each Sql_Post In Request.Form
For SQL_Data=0 To Ubound(SQL_inj)
if instr(Request.Form(Sql_Post),Sql_Inj(Sql_DATA))>0 Then
Response.Write "SQLͨÓ÷À×¢Èëϵͳ"
Response.end
end if
next
next
end if
Ò»°ãÕâÖÖÎÊÌâÊÇÍøÕ¾ÓЩ¶´£¬ÏµÍ³Â©¶´»òÕßSQL×¢È멶´£¬»òÕßÉÏ´«Îļþ©¶´£¬ÎÒÒ²ÉîÊÜÆä¿à£¬È»¶ø£¬ÈçºÎ·ÀÖ¹ÍøÒ³±»Ð޸ļÓÈë½Å±¾²¡¶¾? ÏÖ½«Õâ¸öÎÊÌâ×ܽá·ÖÏíÒ»ÏÂ.
1¡¢¼òµ¥µÄ²¹¾È´ëÊ©£ºÔÚ·þÎñÆ÷IISÖУ¬°ÑËùÓеÄASP£¬HTMLÎļþµÄÊôÐÔÉèÖÃΪEveryoneÖ»¶Á£¨Ò»°ãÊÇIUSR_£©£¬Ö»°ÑÊý¾Ý¿âµÄȨÏÞÉèÖóɿÉд£¬×¢Ò⣺Èç¹ûÄãûÓзþÎñÆ÷µÄ¹ÜÀíȨÏÞ£¬ÄÇôµÇ¼ÉϵĿռäftp£¬Ñ¡ÖÐÄÇЩ²»ÐèҪдÈëµÄÎļþ»òÎļþ¼Ð£¬ÓÒ¼üµã»÷-ÊôÐÔ£º°ÑÆäÖеÄÈý×éдÈëȨÏÞ¶¼È¡Ïû£¬µ«Èç¹ûÄãÓÐACCESSÊý¾Ý¿â£¬Òª°ÑÊý¾Ý¿âÉè³É¿Éд£¬²»È»¶ÁÊý¾Ýʱ»á³ö´í¡£
2¡¢ÏȰѶñÒâ´úÂëɾµô£¨Ìæ»»µô£©£¬È»ºó°ÑÍøվĿ¼ÏµÄËùÓÐÎļþÈ«²¿ÓÃɱÈíɱÏ ,È»ºóÒ»¸öÒ»¸ö¼ì²éÏÂÊÇ·ñ´æÔÚºóÃÅ.
3¡¢ÔÚÄãµÄ³ÌÐòÀïдÉÏÒÔÏ·À×¢È뺯Êý
on error resume next 'ÕâÐдúÂë·Åµ½conn.aspµÄµÚÒ»ÐС£
'·ÀÖ
Ïà¹ØÎĵµ£º
ASPʵÏÖͬһÐéÄâÖ÷»ú¿Õ¼ä°²·Å¶à¸öÍøÕ¾µÄ·½·¨
¡¡¡¡ÏÖÔÚµÄÓòÃûºÜ±ãÒË£¬²»ÉÙÅóÓÑÊÖÀï¶àÉÙ¶¼Óм¸¸ö£¬Èç¹ûÄúÏëÓÃÊÖÖеļ¸¸öÓòÃû×ö¶à¸öÍøÕ¾µÄ»°£¬²¢²»ÓÃͬʱ¹ºÂò¶à¸öÐéÄâÖ÷»ú£¬ÄúÖ»ÒªÏȽ«ÄúËùÓеÄÓòÃû°ó¶¨µ½ÄúµÄÐéÄâÖ÷»úÉÏ£¬È»ºó½«ÐéÄâÖ÷»ú¸ùĿ¼ÖеÄindex.asp£¨Ê×Ò³Îļþ£©Àï¼ÓÈëÏÂÁдúÂë¾Í¿ÉÒÔÁË£º
<%
sn=lcase(Request.Se ......
'--------------------------------------------------------------
'ASP°æHashMapʵÏÖ
'¸ÃʵÏÖ´æ´¢Êý¾ÝΪÓÐÐòÊý¾Ý,ÀàËÆJavaÖеÄLinkedHashMap
'--------------------------------------------------------------
Class HashMap
dim arr()
dim arr_len
'¹¹Ô캯Êý
private Sub Clas ......
ÎÒÏëÔÚaspÖмÓÒ»¸öÁ´½Ó£¬Ö¸Ïòasp.netÍøÒ³£¬µ«asp.netµÄÍøÖ·ÊǾ¹ýHttpUtility.UrlEncode±äÐκÍHttpUtility.UrlDecode±ä»ØµÄ£¬¶øaspµÄserver.urlencodeÈ´²úÉú²»Á˺ÍHttpUtility.UrlEncodeÒ»ÑùµÄ±àÂ룬ÇëÎÊÓÐûÓнâ¾ö°ì·¨
²¹³ä£ºÔÀ´asp.netµÄÊÇ"web.aspx?str="+HttpUtility.UrlEncode(str)
ºÍHttpUtility.UrlDecode(Requ ......
‘·À×¢Èë°ÑËü¼Óµ½connÀïÕâÑù¾ÍokÁË
dim sql_injdata
SQL_injdata = "’|and|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare"
SQL_inj = split(SQL_Injdata,"|")
If Request.QueryString<>"" Then
For Each SQL_Get In Request.QueryString
For SQL_Data=0 To Ubo ......
ʲôÊÇ ADO ´æÈ¡Êý¾Ý¿âʱµÄ·ÖÒ³ÏÔʾ£¿Èç¹ûÄãʹÓùýÄ¿Ç°ÖÚ¶àÍøÕ¾Éϵĵç×Ó¹«¸æ°å³ÌÐòµÄ»°£¬ÄÇÄãÓ¦¸Ã»áÖªµÀµç×Ó¹«¸æ°å³ÌÐòΪÁËÌá¸ßÒ³ÃæµÄ¶ÁÈ¡Ëٶȣ¬Ò»°ã²»»á½«ËùÓеÄÌû×ÓÈ«²¿ÔÚÒ»Ò³ÖÐÂÞÁгöÀ´£¬¶øÊǽ«Æä·Ö³É¶àÒ³ÏÔʾ£¬Ã¿Ò³ÏÔʾһ¶¨ÊýÄ¿µÄÌû×ÓÊý£¬Æ©Èç 20 Ìõ¡£Õâ¾ÍÊÇÊý¾Ý¿â²éѯµÄ·ÖÒ³ÏÔʾ£¬Èç¹ûÄ㻹²»Ã÷°×£¬È¥¿´¿´ yahoo µÈËÑË÷ ......