blackstack-core 1.2.5 → 1.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/extend_float.rb +1 -1
- data/lib/functions.rb +16 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9592570e271e03c770578f608c104b7e558a100b0b91255f7f75cf5fab7e4444
|
4
|
+
data.tar.gz: 6ed68ac325242d9322b245d0eb8bf2ab122e2382fd037fdd548d13803e5d0bbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 837d52cbacb341147b22bb6f7fee9788498aa9efebcbeaf27cd0040536b8d6c5c4a4fe2f7c0d59ddcbf4b782ebf733c5c6318b86a7875ca8735e1e1963e26613
|
7
|
+
data.tar.gz: 4cb67494f9c10e06c72b465fc916076e7d1955fd552f0793505f5bab409fd8761cac90f5f8e4fabb0694653a9f0545a35cd3a66221754313d9ac02d0829bd9ba
|
data/lib/extend_float.rb
CHANGED
data/lib/functions.rb
CHANGED
@@ -819,6 +819,22 @@ module BlackStack
|
|
819
819
|
return a
|
820
820
|
end
|
821
821
|
|
822
|
+
# raise an exception if `email` is not a valid email address.
|
823
|
+
# return an array with the companies who are hosting an email address, by running the linux command `host`.
|
824
|
+
def self.getMailHandler(email)
|
825
|
+
value = email
|
826
|
+
# raise an exception if the data type is an email, but the email is not valid.
|
827
|
+
raise "Email #{value} is not valid" if !value.email?
|
828
|
+
# extract the domain from the email
|
829
|
+
domain = value.split('@').last
|
830
|
+
# run the `host` command
|
831
|
+
s = `host -t mx #{domain}`
|
832
|
+
# extract the domains from the output
|
833
|
+
a = s.split("\n").map { |l| l.split.last }
|
834
|
+
# extract the company who is hosting the mail
|
835
|
+
a.map { |d| d.split('.').last(2).join('.') }.uniq
|
836
|
+
end
|
837
|
+
|
822
838
|
end # module Netting
|
823
839
|
|
824
840
|
end # module BlackStack
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blackstack-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leandro Daniel Sardi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: content_spinning
|