blackstack-core 1.2.8 → 1.2.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec4a7f0ff79d1a2d5b75fcfec7b550b0d1bc488cc5d53b5fa38a4c6c56e8988f
4
- data.tar.gz: 0544bda4b8b7d0ee1c041c34244dfc77c775a45775c7b846cf5213f59cd14950
3
+ metadata.gz: 9f9ada61d055548918448b48e7cf02f31226fefb8721d35b381a796f215df7f4
4
+ data.tar.gz: a28cc19fc248d0263ab165218003b225cb25311d3e985ccc2ae1523c79049837
5
5
  SHA512:
6
- metadata.gz: 74c684e58c57dac13ad568cad95e1319fb1bc7db9f0e247fd169bbf6862ac205db5ba9a759111ba62c9bb87c5988753e330dbd685a67368847ea7af4aa15290f
7
- data.tar.gz: 3b51ad3b02c831291832e8e8ac5544ec71be93d52aa222840baf603b461019e25c6395441ade0d953224ade193c3692c3b71598111d2768312ceb81c0ccd1708
6
+ metadata.gz: 733b6b5f3de03db04524a025b8759f1ed2060bb1bab93f232a4926ea83e352fea8f5fff3c15935c2220bdcb207a7b4cde1877ef26a97042729d431aff96a1e52
7
+ data.tar.gz: a9e8dde42397c2364e4b8e74c271adc3d8697481ce79a09c9cc104f519c6383aa864b2d1604cec8028fcb50fca5526214afc30bd0138b8a7097d92d6a5a93d7b
@@ -1,5 +1,24 @@
1
1
  require_relative '../lib/blackstack-core'
2
2
 
3
+ # inform if it is a personal email address, and who is hosting that email
4
+ a = [
5
+ 'jloftus@qsd.fm',
6
+ 'edg@egadesign.net',
7
+ 'ghorn@strtrade.com',
8
+ 'rbaker@luxurylakeoconee.com',
9
+ 'sabbie.wijaya@gmail.com',
10
+ 'stlbodj@swbell.net',
11
+ 'OKnott@knottmechanical.com',
12
+ 'ctekwani@gmail.com',
13
+ 'billy@altgrouplv.com',
14
+ 'bhaney@kingcastling.com',
15
+ ]
16
+ a.each { |s|
17
+ print "'#{s}'.personal_email?... "
18
+ puts "#{s.personal_email?.to_s} (handler: #{s.mail_handler})"
19
+ }
20
+ exit(0)
21
+
3
22
  # returns true if the string meets all the security requirements for a password
4
23
  puts ""
5
24
  puts "Passwords"
data/lib/extend_string.rb CHANGED
@@ -23,6 +23,20 @@ class String
23
23
  return false
24
24
  end
25
25
 
26
+ # raise an exception if `email` is not a valid email address.
27
+ # return if the email domain is gmail, hotmail, outlook, yahoo, comcast, aol, msn or sbcglobal.
28
+ def personal_email?
29
+ return BlackStack::Netting.isPersonalEmail?(self.to_s)
30
+ end
31
+
32
+ # raise an exception if `email` is not a valid email address.
33
+ # return an array with the companies who are hosting an email address, by running the linux command `host`.
34
+ def mail_handler
35
+ return BlackStack::Netting.getMailHandler(self.to_s)
36
+ end
37
+
38
+
39
+
26
40
  # returns true if the string match with the regex of a domain
27
41
  def domain?
28
42
  return true if self.to_s =~ /^#{BlackStack::Strings::MATCH_DOMAIN}$/
data/lib/functions.rb CHANGED
@@ -844,7 +844,7 @@ module BlackStack
844
844
  # extract the domain from the email
845
845
  domain = value.split('@').last
846
846
  #
847
- domain~=/gmail\.com/ || domain~=/hotmail\.com/ || domain~=/outlook\.com/ || domain~=/yahoo\.com/ || domain~=/comcast\.com/ || domain~=/aol\.com/ || domain~=/msn\.com/ || domain~=/sbcglobal\.net/
847
+ return domain=~/gmail\.com/ || domain=~/hotmail\.com/ || domain=~/outlook\.com/ || domain=~/yahoo\.com/ || domain=~/comcast\.com/ || domain=~/aol\.com/ || domain=~/msn\.com/ || domain=~/sbcglobal\.net/ ? true : false
848
848
  end
849
849
 
850
850
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blackstack-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.8
4
+ version: 1.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi