老铁,就一句代码
Regex.IsMatch(sWord.ToLower(), "/response|group_concat|cmd|sysdate|xor|declare|db_name|char| and| or|truncate| asc| desc|drop |table|count|from|select|insert|update|delete|union|into|load_file|outfile/");
不信,微我

本文分享了一段用于防御SQL注入攻击的代码,通过正则表达式匹配潜在的危险字符串,如SQL关键字和命令,确保了应用程序的安全性。
老铁,就一句代码
Regex.IsMatch(sWord.ToLower(), "/response|group_concat|cmd|sysdate|xor|declare|db_name|char| and| or|truncate| asc| desc|drop |table|count|from|select|insert|update|delete|union|into|load_file|outfile/");
不信,微我

1958