Simple ASP page anti-SQL attack program

xiaoxiao2021-03-05  27

'Check the illegal input CheckRequestItems ()

'Checking illegal SQL injection Function checkRequestItems () for Each Elements in Request.QueryString IF INSTR (1, Request.QueryString (Elements), ";", 1)> 0 and INSTR (1, Request.QueryString (Elements), "EXEC ", 1)> 0 THEN Response.write (" The data you submitted! ") Response.end () end if next for each elements in request.form if instruction (1, request.querystring (elements)," ", 1)> 0 and INSTR (1, Request.QueryString (Elements)," Exec ", 1)> 0 Then Response.write (" The data you submit is not legal! ") Response.end () end if nextend function

转载请注明原文地址:https://www.9cbs.com/read-34361.html

New Post(0)