ruby_smb 0.0.24 → 1.0.0

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: d60db7afb256116a28efdf92fcf911b6b418efda
4
- data.tar.gz: ba1b78916ec040e37d15ec02d9c6a3d1f09af9a4
3
+ metadata.gz: d89696524ee8ae603c50be9ffd9fe6bbcb1f217f
4
+ data.tar.gz: 6fcbab915f26646e9981caf65f5d75de64cea4d1
5
5
  SHA512:
6
- metadata.gz: dc4b60306e19613bdf20deb63d473b796aed95d5abed3e509e14ee5b622c1e012680d803bd9fa57554e5fc44279d810f064248dd127d5ebf2cfcfb3d15a0abdb
7
- data.tar.gz: b1dfd5273575d64e242199655305cf22bfc76c5e1cfdadaf7bd074c9b4dcc53d0a2045b5d90414838fdc91b86bd5cd95889aa7d6e5c3161188d32fa9768545a6
6
+ metadata.gz: 7cd15fadb1d5b251fd73a20914830a26eae38363d3e622bf3219cf46dfa2f0fa72716ff7ff2bd49fa503eaac922676c193b5002bd107f6a9502310c4cadcdda5
7
+ data.tar.gz: 5bdef20abe76ea38602ff99092c15ae19d3bda1d799ae5bda38fd0d2e7110b2115275a962b3df113e31b2a7b29d35ef0e5577bd9c47301fa059205f5f4bd3a11
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -4,12 +4,12 @@ module RubySMB
4
4
 
5
5
  attr_accessor :tree_connects
6
6
  attr_accessor :open_files
7
-
7
+
8
8
  attr_accessor :use_ntlmv2, :usentlm2_session, :send_lm, :use_lanman_key, :send_ntlm, :spnopt
9
9
  attr_accessor :evasion_opts
10
-
10
+
11
11
  attr_accessor :native_os, :native_lm, :verify_signature, :auth_user
12
-
12
+
13
13
  attr_accessor :last_file_id
14
14
 
15
15
  def last_tree
@@ -25,7 +25,7 @@ module RubySMB
25
25
  end
26
26
 
27
27
  def open(path, disposition=RubySMB::Dispositions::FILE_OPEN, write: false, read: true)
28
- file = last_tree.open_file(filename: path, write: write, read: read, disposition: disposition)
28
+ file = last_tree.open_file(filename: path.gsub(/\\/, ''), write: write, read: read, disposition: disposition)
29
29
  @last_file_id = if file.respond_to?(:guid)
30
30
  file.guid.to_binary_s
31
31
  elsif file.respond_to?(:fid)
@@ -35,10 +35,10 @@ module RubySMB
35
35
  @last_file_id
36
36
  end
37
37
 
38
- def create_pipe(path, disposition=RubySMB::Dispositions::FILE_OPEN_IF, impersonation)
38
+ def create_pipe(path, disposition=RubySMB::Dispositions::FILE_OPEN_IF)
39
39
  open(path.gsub(/\\/, ''), disposition, write: true, read: true)
40
40
  end
41
-
41
+
42
42
  #Writes data to an open file handle
43
43
  def write(file_id, offset = 0, data = '', do_recv = true)
44
44
  @open_files[file_id].send_recv_write(data: data, offset: offset)
@@ -49,6 +49,12 @@ module RubySMB
49
49
  data.bytes
50
50
  end
51
51
 
52
+ def delete(path)
53
+ file = last_tree.open_file(filename: path.gsub(/\\/, ''), delete: true)
54
+ file.delete
55
+ file.close
56
+ end
57
+
52
58
  def close(file_id, tree_id)
53
59
  @open_files[file_id].close
54
60
  end
@@ -56,23 +62,23 @@ module RubySMB
56
62
  def tree_disconnect(share)
57
63
  @tree_connects.detect{|tree| tree.id == share }.disconnect!
58
64
  end
59
-
65
+
60
66
  def native_os
61
67
  @peer_native
62
68
  end
63
-
69
+
64
70
  def native_lm
65
71
  @native_lm
66
72
  end
67
-
73
+
68
74
  def verify_signature
69
75
  @signing_required
70
76
  end
71
-
77
+
72
78
  def auth_user
73
79
  @username
74
80
  end
75
-
81
+
76
82
  end
77
83
  end
78
84
  end
@@ -1,3 +1,3 @@
1
1
  module RubySMB
2
- VERSION = '0.0.24'.freeze
2
+ VERSION = '1.0.0'.freeze
3
3
  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.24
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Maloney
@@ -91,7 +91,7 @@ cert_chain:
91
91
  G+Hmcg1v810agasPdoydE0RTVZgEOOMoQ07qu7JFXVWZ9ZQpHT7qJATWL/b2csFG
92
92
  8mVuTXnyJOKRJA==
93
93
  -----END CERTIFICATE-----
94
- date: 2018-04-30 00:00:00.000000000 Z
94
+ date: 2018-06-25 00:00:00.000000000 Z
95
95
  dependencies:
96
96
  - !ruby/object:Gem::Dependency
97
97
  name: redcarpet
metadata.gz.sig CHANGED
Binary file