enzoic 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +11 -6
- data/lib/enzoic/version.rb +1 -1
- data/lib/enzoic.rb +3 -2
- 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: d13fca15fa76f249a013adea0bac59023d847f8021bfe16748999ff0f5d26e52
|
4
|
+
data.tar.gz: a64b16ddd1f5ae4eb7dbdf97672c9a36958ae4099698181f47d88a815626d01e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf9305fce6e41d506b445c8e3b17b7ffea8e816482ace8d872dc1a464c260d1b25bbb3d81e88534c2d6bb6a084bb5c0bded0dbfb76cd494a98cfb1d7dbfaeb01
|
7
|
+
data.tar.gz: 6aa0dfb06cfbeda5f130a92c77dcb51b36874b0aea2eb128d25c5dc91e033c56228a8af1cbf9b739f4ce9ea494a52e1aa6068b455f2d695b36036cecc58d0995
|
data/README.md
CHANGED
@@ -35,7 +35,8 @@ require 'enzoic'
|
|
35
35
|
enzoic = Enzoic::Enzoic.new(apiKey: YOUR_API_KEY, secret: YOUR_API_SECRET)
|
36
36
|
|
37
37
|
# Check whether a password has been compromised
|
38
|
-
#
|
38
|
+
# for more information, see
|
39
|
+
# https://docs.enzoic.com/enzoic-api-developer-documentation/api-reference/passwords-api
|
39
40
|
if enzoic.check_password("password-to-test")
|
40
41
|
puts("Password is compromised")
|
41
42
|
else
|
@@ -43,7 +44,8 @@ else
|
|
43
44
|
end
|
44
45
|
|
45
46
|
# Check whether a specific set of credentials are compromised
|
46
|
-
#
|
47
|
+
# for more information, see
|
48
|
+
# https://docs.enzoic.com/enzoic-api-developer-documentation/api-reference/credentials-api/hashed-credentials-api
|
47
49
|
if enzoic.check_credentials("test@enzoic.com", "password-to-test")
|
48
50
|
puts("Credentials are compromised")
|
49
51
|
else
|
@@ -63,18 +65,21 @@ else
|
|
63
65
|
end
|
64
66
|
|
65
67
|
# get all exposures for a given user
|
66
|
-
#
|
68
|
+
# for more information, see
|
69
|
+
# https://docs.enzoic.com/enzoic-api-developer-documentation/api-reference/exposures-api/get-exposures-for-an-email-address
|
67
70
|
exposures = enzoic.get_exposures_for_user("test@enzoic.com")
|
68
71
|
puts(exposures.count.to_s + " exposures found for test@enzoic.com")
|
69
72
|
|
70
73
|
# now get the full details for the first exposure found
|
71
|
-
#
|
74
|
+
# for more information, see
|
75
|
+
# https://docs.enzoic.com/enzoic-api-developer-documentation/api-reference/exposures-api/retrieve-details-for-an-exposure
|
72
76
|
details = enzoic.get_exposure_details(exposures.exposures[0])
|
73
77
|
puts("First exposure for test@enzoic.com was " + details.title)
|
74
78
|
|
75
79
|
# get all passwords for a given user - requires special approval, contact Enzoic sales
|
76
|
-
#
|
77
|
-
|
80
|
+
# for more information, see
|
81
|
+
# https://docs.enzoic.com/enzoic-api-developer-documentation/api-reference/credentials-api/cleartext-credentials-api
|
82
|
+
user_passwords = enzoic.get_passwords_for_user("eicar_0@enzoic.com", true)
|
78
83
|
puts("First password for eicar_0@enzoic.com was " + user_passwords.passwords[0].password)
|
79
84
|
|
80
85
|
```
|
data/lib/enzoic/version.rb
CHANGED
data/lib/enzoic.rb
CHANGED
@@ -138,9 +138,10 @@ module Enzoic
|
|
138
138
|
end
|
139
139
|
end
|
140
140
|
|
141
|
-
def get_passwords_for_user(username)
|
141
|
+
def get_passwords_for_user(username, include_exposure_details = false)
|
142
142
|
response = make_rest_call(@baseURL + Constants::ACCOUNTS_API_PATH + "?username=" +
|
143
|
-
Hashing.sha256(username.downcase) + "&includePasswords=1"
|
143
|
+
Hashing.sha256(username.downcase) + "&includePasswords=1" +
|
144
|
+
(include_exposure_details ? "&includeExposureDetails=1" : ""),
|
144
145
|
"GET", nil)
|
145
146
|
|
146
147
|
if response == "404"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enzoic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Enzoic
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|