ruby_smb 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/examples/tree_connect.rb +9 -2
- data/lib/ruby_smb.rb +0 -1
- data/lib/ruby_smb/client.rb +12 -0
- data/lib/ruby_smb/version.rb +1 -1
- data/ruby_smb.gemspec +2 -3
- metadata +3 -17
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d730a6a0e6943e7d8e8e519f8fca041fb96d48e0
|
4
|
+
data.tar.gz: a5f252ba978e403a832846827b45f95602cd715c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12b3d5af427ac2655c469d7c3b94796d0125c2f6d4e7c883494d304cb65489bb4c131e258ace6a5dcbf8421b4bc79bad9639144d4b0301d9e0acf72caf1091a3
|
7
|
+
data.tar.gz: e7bc4b20c587c1e2ac982f3d98b5a2c91085ad17fcf66115749c5af726a972a3415c36cba9957774844cb9e423e6635e8499e0d8ab64069eafa7db276a006818
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/examples/tree_connect.rb
CHANGED
@@ -23,5 +23,12 @@ status = client.authenticate
|
|
23
23
|
|
24
24
|
puts "#{protocol} : #{status}"
|
25
25
|
|
26
|
-
|
27
|
-
tree.
|
26
|
+
begin
|
27
|
+
tree = client.tree_connect(path)
|
28
|
+
puts "Connected to #{path} successfully!"
|
29
|
+
tree.disconnect!
|
30
|
+
rescue Exception => e
|
31
|
+
puts "Failed to connect to #{path}: #{e.message}"
|
32
|
+
end
|
33
|
+
|
34
|
+
|
data/lib/ruby_smb.rb
CHANGED
data/lib/ruby_smb/client.rb
CHANGED
@@ -178,6 +178,18 @@ module RubySMB
|
|
178
178
|
raw_response
|
179
179
|
end
|
180
180
|
|
181
|
+
# Connects to the supplied share
|
182
|
+
#
|
183
|
+
# @param share [String] the path to the share in `\\server\share_name` format
|
184
|
+
# @return [RubySMB::SMB1::Tree] if talking over SMB1
|
185
|
+
# @return [RubySMB::SMB2::Tree] if talking over SMB2
|
186
|
+
def tree_connect(share)
|
187
|
+
if smb2
|
188
|
+
smb2_tree_connect(share)
|
189
|
+
else
|
190
|
+
smb1_tree_connect(share)
|
191
|
+
end
|
192
|
+
end
|
181
193
|
private
|
182
194
|
|
183
195
|
|
data/lib/ruby_smb/version.rb
CHANGED
data/ruby_smb.gemspec
CHANGED
@@ -8,9 +8,9 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = RubySMB::VERSION
|
9
9
|
spec.authors = ['David Maloney', 'James Lee']
|
10
10
|
spec.email = ['DMaloney@rapid7.com', 'egypt@metasploit.com']
|
11
|
-
spec.summary = 'A
|
11
|
+
spec.summary = 'A pure Ruby implementation of the SMB Protocol Family'
|
12
12
|
spec.description = ''
|
13
|
-
spec.homepage = '
|
13
|
+
spec.homepage = 'https://github.com/rapid7/ruby_smb'
|
14
14
|
spec.license = 'BSD-3-clause'
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
@@ -32,7 +32,6 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.add_development_dependency 'yard'
|
33
33
|
|
34
34
|
spec.add_runtime_dependency 'rubyntlm'
|
35
|
-
spec.add_runtime_dependency 'bit-struct'
|
36
35
|
spec.add_runtime_dependency 'windows_error'
|
37
36
|
spec.add_runtime_dependency 'bindata'
|
38
37
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_smb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Maloney
|
@@ -175,20 +175,6 @@ dependencies:
|
|
175
175
|
- - ">="
|
176
176
|
- !ruby/object:Gem::Version
|
177
177
|
version: '0'
|
178
|
-
- !ruby/object:Gem::Dependency
|
179
|
-
name: bit-struct
|
180
|
-
requirement: !ruby/object:Gem::Requirement
|
181
|
-
requirements:
|
182
|
-
- - ">="
|
183
|
-
- !ruby/object:Gem::Version
|
184
|
-
version: '0'
|
185
|
-
type: :runtime
|
186
|
-
prerelease: false
|
187
|
-
version_requirements: !ruby/object:Gem::Requirement
|
188
|
-
requirements:
|
189
|
-
- - ">="
|
190
|
-
- !ruby/object:Gem::Version
|
191
|
-
version: '0'
|
192
178
|
- !ruby/object:Gem::Dependency
|
193
179
|
name: windows_error
|
194
180
|
requirement: !ruby/object:Gem::Requirement
|
@@ -361,7 +347,7 @@ files:
|
|
361
347
|
- spec/spec_helper.rb
|
362
348
|
- spec/support/mock_socket_dispatcher.rb
|
363
349
|
- spec/support/shared/examples/bit_field_single_flag.rb
|
364
|
-
homepage:
|
350
|
+
homepage: https://github.com/rapid7/ruby_smb
|
365
351
|
licenses:
|
366
352
|
- BSD-3-clause
|
367
353
|
metadata: {}
|
@@ -384,7 +370,7 @@ rubyforge_project:
|
|
384
370
|
rubygems_version: 2.4.8
|
385
371
|
signing_key:
|
386
372
|
specification_version: 4
|
387
|
-
summary: A
|
373
|
+
summary: A pure Ruby implementation of the SMB Protocol Family
|
388
374
|
test_files:
|
389
375
|
- spec/lib/ruby_smb/client_spec.rb
|
390
376
|
- spec/lib/ruby_smb/dispatcher/dispatcher_base_spec.rb
|
metadata.gz.sig
CHANGED
Binary file
|