Module: HomographicSpoofing

Defined in:
lib/homographic_spoofing.rb,
lib/homographic_spoofing/version.rb

Defined Under Namespace

Classes: Railtie

Constant Summary collapse

VERSION =
"0.1.1"

Class Method Summary collapse

Class Method Details

.email_address_spoof?(email_address) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/homographic_spoofing.rb', line 17

def email_address_spoof?(email_address)
  HomographicSpoofing::Detector::EmailAddress.detected?(email_address)
end

.email_local_spoof?(email_address) ⇒ Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/homographic_spoofing.rb', line 25

def email_local_spoof?(email_address)
  HomographicSpoofing::Detector::Local.detected?(email_address)
end

.email_name_spoof?(email_address) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/homographic_spoofing.rb', line 21

def email_name_spoof?(email_address)
  HomographicSpoofing::Detector::QuotedString.detected?(email_address)
end

.idn_spoof?(idn) ⇒ Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/homographic_spoofing.rb', line 29

def idn_spoof?(idn)
  HomographicSpoofing::Detector::Idn.detected?(idn)
end

.sanitize_email_address(email_address) ⇒ Object



33
34
35
# File 'lib/homographic_spoofing.rb', line 33

def sanitize_email_address(email_address)
  HomographicSpoofing::Sanitizer::EmailAddress.sanitize(email_address)
end

.sanitize_email_name(email_address) ⇒ Object



37
38
39
# File 'lib/homographic_spoofing.rb', line 37

def sanitize_email_name(email_address)
  HomographicSpoofing::Sanitizer::QuotedString.sanitize(email_address)
end

.sanitize_idn(idn) ⇒ Object



41
42
43
# File 'lib/homographic_spoofing.rb', line 41

def sanitize_idn(idn)
  HomographicSpoofing::Sanitizer::Idn.sanitize(idn)
end