Class: HomographicSpoofing::Detector::Rule::QuotedString::BidiControl

Inherits:
Base
  • Object
show all
Defined in:
lib/homographic_spoofing/detector/rule/quoted_string/bidi_control.rb

Overview

Constant Summary collapse

DISALLOWED_REGEXP =

See util.unicode.org/UnicodeJsps/list-unicodeset.jsp?a=%5B%3Abidicontrol%3A%5D&c=on&g=&i= for the full list of bidirectional format characters.

/[\u202a\u202b\u202c\u202d\u202e\u2066\u2067\u2068\u2069]/

Instance Method Summary collapse

Instance Method Details

#attack_detected?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/homographic_spoofing/detector/rule/quoted_string/bidi_control.rb', line 7

def attack_detected?
  DISALLOWED_REGEXP.match?(label)
end