jwtear 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/jwtear.gemspec +1 -1
- data/lib/jwtear/helpers/utils.rb +4 -4
- data/lib/jwtear/version.rb +1 -1
- data/plugins/bruteforce.rb +3 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e325882534b86402268e985372b35209081c98c9c4bf7f23534c7fa098388f5
|
4
|
+
data.tar.gz: cb11ceb477305198e61b56d6806df69760845cc6f12b05c1dac4f29b2a8dbb26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a582c094d9cc6e632ef1097a9f6ea12cc441ebffd09ecbeb9be751e9e3382059a1e3546cb028defad7606336ec508f1a2441e16433a1e977e64dcfd1c1abf89d
|
7
|
+
data.tar.gz: edee73199d6fb13e1e0be565d6a1bac562c284258615de55f6c570379d2a42b17f41053f44725e4e38169b71f23a277eb25f66318553577008b1de091438f197
|
data/Gemfile.lock
CHANGED
data/jwtear.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_dependency 'gli', '~> 2.19', '>= 2.19.0'
|
22
|
-
spec.add_dependency 'json-jwt', '~> 1.
|
22
|
+
spec.add_dependency 'json-jwt', '~> 1.11', '>= 1.11.0'
|
23
23
|
spec.add_dependency 'jwe', "~> 0.4.0"
|
24
24
|
spec.add_dependency 'tty-markdown', "~> 0.6.0"
|
25
25
|
spec.add_dependency 'tty-pager', "~> 0.12.1"
|
data/lib/jwtear/helpers/utils.rb
CHANGED
@@ -27,18 +27,18 @@ module JWTear
|
|
27
27
|
# check_dependencies
|
28
28
|
# check dependencies for plugins and throw a gentle error if not installed
|
29
29
|
# @param deps [Hash]
|
30
|
-
# The key is the
|
30
|
+
# The key is the key is the gem name to be installed, the value is library to be require
|
31
31
|
# @example
|
32
32
|
# deps = {'async-io' => 'async/ip'}
|
33
33
|
# check_dependencies(deps)
|
34
34
|
#
|
35
35
|
def check_dependencies(deps={})
|
36
|
-
return if deps.empty?
|
36
|
+
return if deps.empty? or deps.nil?
|
37
37
|
missing = []
|
38
38
|
|
39
|
-
deps.each do |gem,
|
39
|
+
deps.each do |gem, lib|
|
40
40
|
begin
|
41
|
-
require
|
41
|
+
require lib
|
42
42
|
rescue LoadError
|
43
43
|
missing << gem
|
44
44
|
end
|
data/lib/jwtear/version.rb
CHANGED
data/plugins/bruteforce.rb
CHANGED
@@ -33,7 +33,7 @@ module JWTear
|
|
33
33
|
include JWTear::Helpers::Utils
|
34
34
|
|
35
35
|
def initialize(token, list)
|
36
|
-
deps = {
|
36
|
+
deps = {}
|
37
37
|
check_dependencies(deps)
|
38
38
|
@token = Token.new
|
39
39
|
@jws = @token.parse(token)
|
@@ -48,7 +48,7 @@ module JWTear
|
|
48
48
|
key.valid_encoding? ? key.strip! : next
|
49
49
|
print_status "Trying password: #{key}" if verbose
|
50
50
|
|
51
|
-
gen_token = @token.generate(:jws, header: @jws.header.to_json, payload
|
51
|
+
gen_token = @token.generate(:jws, header: @jws.header.to_json, payload: @jws.payload.to_json , key: key)
|
52
52
|
sig = gen_token.split('.').last
|
53
53
|
if sig == Base64.urlsafe_encode64(@jws.signature, padding: false)
|
54
54
|
print_good "Password found: #{key}"
|
@@ -59,7 +59,7 @@ module JWTear
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
when keys.kind_of?(String)
|
62
|
-
gen_token = @token.generate(:jws, header: @jws.header.to_json, payload
|
62
|
+
gen_token = @token.generate(:jws, header: @jws.header.to_json, payload: @jws.payload.to_json , key: keys)
|
63
63
|
sig = gen_token.split('.').last
|
64
64
|
if sig == Base64.urlsafe_encode64(@jws.signature, padding: false)
|
65
65
|
print_good "Password found: #{keys}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jwtear
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- KING SABRI
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gli
|
@@ -36,20 +36,20 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '1.
|
39
|
+
version: '1.11'
|
40
40
|
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 1.
|
42
|
+
version: 1.11.0
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - "~>"
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: '1.
|
49
|
+
version: '1.11'
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 1.
|
52
|
+
version: 1.11.0
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: jwe
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|