Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Marsaud Smb2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Marsaud Smb2
Commits
1f1f6a0e
Commit
1f1f6a0e
authored
May 07, 2019
by
Victor
Committed by
Julien Fontanet
May 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: reset connection metadata on reconnection (#42)
parent
db1e2114
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
lib/smb2.js
lib/smb2.js
+0
-6
lib/tools/smb2-connection.js
lib/tools/smb2-connection.js
+6
-0
No files found.
lib/smb2.js
View file @
1f1f6a0e
...
...
@@ -31,9 +31,6 @@ var SMB = (module.exports = function(opt) {
// set default port
this
.
port
=
opt
.
port
||
port
;
// set message id
this
.
messageId
=
0
;
// extract share
this
.
share
=
matches
[
2
];
...
...
@@ -55,9 +52,6 @@ var SMB = (module.exports = function(opt) {
this
.
username
=
opt
.
username
;
this
.
password
=
opt
.
password
;
// set session id
this
.
SessionId
=
Math
.
floor
(
Math
.
random
()
*
256
)
&
0xff
;
// set the process id
// https://msdn.microsoft.com/en-us/library/ff470100.aspx
this
.
ProcessId
=
Buffer
.
from
([
...
...
lib/tools/smb2-connection.js
View file @
1f1f6a0e
...
...
@@ -90,6 +90,12 @@ function connect(connection, cb) {
cb
=
scheduleAutoClose
(
connection
,
cb
);
// set message id
connection
.
messageId
=
0
;
// set session id
connection
.
SessionId
=
Math
.
floor
(
Math
.
random
()
*
256
)
&
0xff
;
// open TCP socket
connection
.
socket
.
connect
(
connection
.
port
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment