SQLInjection class

SQL 注入检测工具类(关键词黑名单匹配)

本类用于检测用户输入中是否包含潜在的 SQL 注入关键字或注入尝试模式, 采用基于关键词(keyword blacklist)的简单匹配策略,可用于表单输入校验、 防止客户端 SQL 注入探测行为等用途。

注意:

  • 本工具仅适用于客户端输入预防用途,无法取代后端数据库层面的安全防护(如参数化查询)
  • 若需更高安全等级,建议配合服务端 WAF、防火墙规则、AST 分析使用

Constructors

SQLInjection.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

containsInjection(dynamic input) bool
判断指定输入内容是否包含 SQL 注入关键字。
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited