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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/ruby_smb/client/utils.rb +17 -11
- data/lib/ruby_smb/version.rb +1 -1
- metadata +2 -2
- 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: d89696524ee8ae603c50be9ffd9fe6bbcb1f217f
|
4
|
+
data.tar.gz: 6fcbab915f26646e9981caf65f5d75de64cea4d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
data/lib/ruby_smb/version.rb
CHANGED
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: 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-
|
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
|