MukundaKatta/homoglyph-detect
GitHub: MukundaKatta/homoglyph-detect
一个零依赖的 Rust 库,用于检测和归一化伪装成 ASCII 字母的 Unicode 同形字符,防范关键词绕过与钓鱼攻击。
Stars: 0 | Forks: 0
# homoglyph-detect
[](https://crates.io/crates/homoglyph-detect)
检测伪装成 ASCII 字母的西里尔字母 / 希腊字母 / 全角形似字符。能够捕捉到绕过关键字匹配的 `cl\u{0430}ude` 技巧。
```
use homoglyph_detect::{find_homoglyphs, normalize_to_ascii};
let attack = "cl\u{0430}ude";
let hits = find_homoglyphs(attack);
assert_eq!(hits[0].ascii_equivalent, 'a');
assert_eq!(normalize_to_ascii(attack), "claude");
```
零依赖。MIT 或 Apache-2.0。
标签:Rust, 可视化界面, 同形字检测, 提示词注入防御, 文本处理, 网络流量审计, 通知系统, 钓鱼防御, 零依赖