rubyntlm 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.travis.yml +5 -1
- data/lib/net/ntlm.rb +869 -845
- data/rubyntlm.gemspec +2 -2
- data/spec/unit/ntlm_spec.rb +14 -6
- metadata +61 -49
- data/Gemfile.lock +0 -27
data/rubyntlm.gemspec
CHANGED
@@ -16,8 +16,8 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
17
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
18
18
|
s.require_paths = ["lib"]
|
19
|
-
|
20
|
-
s.required_ruby_version = '>= 1.
|
19
|
+
|
20
|
+
s.required_ruby_version = '>= 1.8.7'
|
21
21
|
|
22
22
|
s.add_development_dependency "rake"
|
23
23
|
s.add_development_dependency "rspec"
|
data/spec/unit/ntlm_spec.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
$:.unshift(File.expand_path(File.dirname(__FILE__) << '../lib'))
|
3
|
-
require 'net/ntlm'
|
4
3
|
|
5
4
|
describe Net::NTLM::Message do
|
6
5
|
let(:type1_packet) {"TlRMTVNTUAABAAAAB4IIAAAAAAAgAAAAAAAAACAAAAA="}
|
@@ -32,10 +31,19 @@ describe Net::NTLM::Message do
|
|
32
31
|
t2.challenge.should == 14872292244261496103
|
33
32
|
t2.context.should == 0
|
34
33
|
t2.flag.should == 42631685
|
35
|
-
|
34
|
+
if "".respond_to?(:force_encoding)
|
35
|
+
t2.padding.should == ("\x06\x01\xB1\x1D\0\0\0\x0F".force_encoding('ASCII-8BIT'))
|
36
|
+
end
|
36
37
|
t2.sign.should == "NTLMSSP\0"
|
37
|
-
|
38
|
-
Net::NTLM.decode_utf16le(t2.
|
38
|
+
|
39
|
+
t2_target_info = Net::NTLM::EncodeUtil.decode_utf16le(t2.target_info)
|
40
|
+
if RUBY_VERSION == "1.8.7"
|
41
|
+
t2_target_info.should == "\x02\x1CVAGRANT-2008R2\x01\x1CVAGRANT-2008R2\x04\x1Cvagrant-2008R2\x03\x1Cvagrant-2008R2\a\b\e$(D+&\e(B\0\0"
|
42
|
+
else
|
43
|
+
t2_target_info.should == "\u0002\u001CVAGRANT-2008R2\u0001\u001CVAGRANT-2008R2\u0004\u001Cvagrant-2008R2\u0003\u001Cvagrant-2008R2\a\b፤ᐝ❴ǎ\0\0"
|
44
|
+
end
|
45
|
+
|
46
|
+
Net::NTLM::EncodeUtil.decode_utf16le(t2.target_name).should == "VAGRANT-2008R2"
|
39
47
|
t2.type.should == 2
|
40
48
|
end
|
41
49
|
|
@@ -86,7 +94,7 @@ describe Net::NTLM do
|
|
86
94
|
let(:client_ch) {["ffffff0011223344"].pack("H*")}
|
87
95
|
let(:timestamp) {1055844000}
|
88
96
|
let(:trgt_info) {[
|
89
|
-
"02000c0044004f004d00410049004e00" +
|
97
|
+
"02000c0044004f004d00410049004e00" +
|
90
98
|
"01000c00530045005200560045005200" +
|
91
99
|
"0400140064006f006d00610069006e00" +
|
92
100
|
"2e0063006f006d000300220073006500" +
|
@@ -100,7 +108,7 @@ describe Net::NTLM do
|
|
100
108
|
end
|
101
109
|
|
102
110
|
it 'should generate an ntlm_hash' do
|
103
|
-
Net::NTLM::ntlm_hash(passwd).should == ["cd06ca7c7e10c99b1d33b7485a2ed808"].pack("H*")
|
111
|
+
Net::NTLM::ntlm_hash(passwd).should == ["cd06ca7c7e10c99b1d33b7485a2ed808"].pack("H*")
|
104
112
|
end
|
105
113
|
|
106
114
|
it 'should generate an ntlmv2_hash' do
|
metadata
CHANGED
@@ -1,62 +1,66 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubyntlm
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 2362275040882391270
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 3
|
9
|
+
- 2
|
10
|
+
version: 0.3.2
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Kohei Kajimoto
|
9
14
|
- Paul Morton
|
10
15
|
autorequire:
|
11
16
|
bindir: bin
|
12
17
|
cert_chain: []
|
13
|
-
|
14
|
-
|
15
|
-
|
18
|
+
|
19
|
+
date: 2013-06-24 00:00:00 Z
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
16
22
|
name: rake
|
17
|
-
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
|
-
requirements:
|
20
|
-
- - '>='
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '0'
|
23
|
-
type: :development
|
24
23
|
prerelease: false
|
25
|
-
|
26
|
-
none: false
|
27
|
-
requirements:
|
28
|
-
- - '>='
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
version: '0'
|
31
|
-
- !ruby/object:Gem::Dependency
|
32
|
-
name: rspec
|
33
|
-
requirement: !ruby/object:Gem::Requirement
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
34
25
|
none: false
|
35
|
-
requirements:
|
36
|
-
- -
|
37
|
-
- !ruby/object:Gem::Version
|
38
|
-
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 2002549777813010636
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
version: "0"
|
39
33
|
type: :development
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: rspec
|
40
37
|
prerelease: false
|
41
|
-
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
42
39
|
none: false
|
43
|
-
requirements:
|
44
|
-
- -
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 2002549777813010636
|
44
|
+
segments:
|
45
|
+
- 0
|
46
|
+
version: "0"
|
47
|
+
type: :development
|
48
|
+
version_requirements: *id002
|
47
49
|
description: Ruby/NTLM provides message creator and parser for the NTLM authentication.
|
48
|
-
email:
|
50
|
+
email:
|
49
51
|
- koheik@gmail.com
|
50
52
|
- paul.e.morton@gmail.com
|
51
53
|
executables: []
|
54
|
+
|
52
55
|
extensions: []
|
56
|
+
|
53
57
|
extra_rdoc_files: []
|
54
|
-
|
58
|
+
|
59
|
+
files:
|
55
60
|
- .gitignore
|
56
61
|
- .travis.yml
|
57
62
|
- CHANGELOG.md
|
58
63
|
- Gemfile
|
59
|
-
- Gemfile.lock
|
60
64
|
- README.md
|
61
65
|
- Rakefile
|
62
66
|
- examples/http.rb
|
@@ -68,30 +72,38 @@ files:
|
|
68
72
|
- spec/unit/ntlm_spec.rb
|
69
73
|
homepage: https://github.com/winrb/rubyntlm
|
70
74
|
licenses: []
|
75
|
+
|
71
76
|
post_install_message:
|
72
77
|
rdoc_options: []
|
73
|
-
|
78
|
+
|
79
|
+
require_paths:
|
74
80
|
- lib
|
75
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
81
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
76
82
|
none: false
|
77
|
-
requirements:
|
78
|
-
- -
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
|
81
|
-
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
hash: 2109750415666882822
|
87
|
+
segments:
|
88
|
+
- 1
|
89
|
+
- 8
|
90
|
+
- 7
|
91
|
+
version: 1.8.7
|
92
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
93
|
none: false
|
83
|
-
requirements:
|
84
|
-
- -
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
|
87
|
-
segments:
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
hash: 2002549777813010636
|
98
|
+
segments:
|
88
99
|
- 0
|
89
|
-
|
100
|
+
version: "0"
|
90
101
|
requirements: []
|
102
|
+
|
91
103
|
rubyforge_project:
|
92
104
|
rubygems_version: 1.8.25
|
93
105
|
signing_key:
|
94
106
|
specification_version: 3
|
95
107
|
summary: Ruby/NTLM library.
|
96
|
-
test_files:
|
108
|
+
test_files:
|
97
109
|
- spec/unit/ntlm_spec.rb
|
data/Gemfile.lock
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
rubyntlm (0.3.1)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: https://rubygems.org/
|
8
|
-
specs:
|
9
|
-
diff-lcs (1.2.1)
|
10
|
-
rake (10.0.3)
|
11
|
-
rspec (2.13.0)
|
12
|
-
rspec-core (~> 2.13.0)
|
13
|
-
rspec-expectations (~> 2.13.0)
|
14
|
-
rspec-mocks (~> 2.13.0)
|
15
|
-
rspec-core (2.13.1)
|
16
|
-
rspec-expectations (2.13.0)
|
17
|
-
diff-lcs (>= 1.1.3, < 2.0)
|
18
|
-
rspec-mocks (2.13.0)
|
19
|
-
|
20
|
-
PLATFORMS
|
21
|
-
java
|
22
|
-
ruby
|
23
|
-
|
24
|
-
DEPENDENCIES
|
25
|
-
rake
|
26
|
-
rspec
|
27
|
-
rubyntlm!
|