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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4447c748fa5ae3b4bade1f7da2f90b05e98f90e3
4
- data.tar.gz: 0a077bd853a42f08210f527475965459347570a0
3
+ metadata.gz: d730a6a0e6943e7d8e8e519f8fca041fb96d48e0
4
+ data.tar.gz: a5f252ba978e403a832846827b45f95602cd715c
5
5
  SHA512:
6
- metadata.gz: 0284a70fde3ac94578b232fb30cfd0a2a579947104a700371cd04f78b9b29ff295ac4f90423fbb280848fc35f1095b42c9f3caa0c229dbee02a1f8480466b28e
7
- data.tar.gz: 94ba89646185e15f2c2a945849948287fb01734523c092fbe410f0e8d42d31b518c53eb2689192d64358fda5493fbf791d12e3cd0e3ce2102828f0345910ad13
6
+ metadata.gz: 12b3d5af427ac2655c469d7c3b94796d0125c2f6d4e7c883494d304cb65489bb4c131e258ace6a5dcbf8421b4bc79bad9639144d4b0301d9e0acf72caf1091a3
7
+ data.tar.gz: e7bc4b20c587c1e2ac982f3d98b5a2c91085ad17fcf66115749c5af726a972a3415c36cba9957774844cb9e423e6635e8499e0d8ab64069eafa7db276a006818
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -23,5 +23,12 @@ status = client.authenticate
23
23
 
24
24
  puts "#{protocol} : #{status}"
25
25
 
26
- tree = client.smb2_tree_connect(path)
27
- tree.disconnect!
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
@@ -1,4 +1,3 @@
1
- require 'bit-struct'
2
1
  require 'bindata'
3
2
  require 'net/ntlm'
4
3
  require 'net/ntlm/client'
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module RubySMB
2
- VERSION = '0.0.9'
2
+ VERSION = '0.0.10'
3
3
  end
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 message creator and parser for the SMB protocol family'
11
+ spec.summary = 'A pure Ruby implementation of the SMB Protocol Family'
12
12
  spec.description = ''
13
- spec.homepage = 'http://www.metasploit.com'
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.9
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: http://www.metasploit.com
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 message creator and parser for the SMB protocol family
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