ASP-based SQL Universal Anti-injection module provides application skills

Source: Internet
Author: User
Copy Code code as follows:

<%
Dim Fs_nosqlhack_allstr,fs_nosqlhack_str,fs_nosqlhack_comeurlget,fs_nosqlhack_comeurlpost,fs_nosqlhack_get,fs_ Nosqlhack_post,fs_nosqlhack_i
' On Error Resume Next
Fs_nosqlhack_allstr= "' |;| and |CHR (|exec |insert |select |delete from|update (|mid.)
Fs_nosqlhack_comeurlget = Request.QueryString
Fs_nosqlhack_comeurlpost = Request.Form
Fs_nosqlhack_str = Split (fs_nosqlhack_allstr, "|")
' Post
If fs_nosqlhack_comeurlpost<> "" Then
For each fs_nosqlhack_post in Request.Form
For fs_nosqlhack_i = 0 to Ubound (FS_NOSQLHACK_STR)
If Instr (LCase (Request.Form (Fs_nosqlhack_post)), Fs_nosqlhack_str (fs_nosqlhack_i)) <>0 Then
Response.Write ("error!!")
Response.End
End If
Next
Next
End If
' Get
If fs_nosqlhack_comeurlget<> "" Then
For each fs_nosqlhack_get in Request.QueryString
For fs_nosqlhack_i = 0 to Ubound (FS_NOSQLHACK_STR)
If Instr (LCase (Request.QueryString (Fs_nosqlhack_get)), Fs_nosqlhack_str (fs_nosqlhack_i)) <>0 Then
Response.Write ("error!!")
Response.End
End If
Next
Next
End If
%>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.