Class: HomographicSpoofing::Detector::Rule::Idn::DeviationCharacters
- Inherits:
-
Base
- Object
- Base
- HomographicSpoofing::Detector::Rule::Idn::DeviationCharacters
- Defined in:
- lib/homographic_spoofing/detector/rule/idn/deviation_characters.rb
Overview
Four characters handled differently by IDNA 2003 and IDNA 2008. UTS46 transitional processing treats them as IDNA 2003 does; maps U+00DF and U+03C2 and drops U+200.
Constant Summary collapse
- DEVIATION_CHARACTERS =
%W[ ß ς \u200c \u200d ].to_set
Instance Method Summary collapse
Instance Method Details
#attack_detected? ⇒ Boolean
7 8 9 |
# File 'lib/homographic_spoofing/detector/rule/idn/deviation_characters.rb', line 7 def attack_detected? (label_set & DEVIATION_CHARACTERS).present? end |