越来越多的SQL注入***让你的服务器和电脑防不胜防,其实可以通过硬件防火墙来过滤掉这些敏感字符,来防止SQL注入和常见病毒***,常见的应该过滤的字符如下:
and <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

and 1=1

and 1=2

and 0

<>

select

count(*)

from

 declare

 @a

 set

'xp_'

'cmdshell'

 exec

dir

c:\

winnt\system32

windows\system32

cmd.exe

cmdshell

οnerrοr=

'

--

"

\

$

NULL

? = &

'or''='

"''"

"''''"

 SELECT

 FROM

 WHERE

 Count(*)

net user

/add

exec%20

xp_cmdshell

 insert

 delete

 drop

 truncate

../

.../

XXXXX

xxxxx

%<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />5c
 
将这些字符列入防火墙的特殊字符过滤,效果不错。