Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

security handshake now failing at least

  • Loading branch information...
commit 791cd1b6c6c7c045968e5967867765620bd41d6c 1 parent 1d5d2a3
James Halliday authored
Showing with 17 additions and 17 deletions.
  1. +1 −1  index.js
  2. +16 −16 lib/handshake.js
2  index.js
View
@@ -48,7 +48,7 @@ module.exports = function (opts) {
size = s;
});
- var stream = net.createConnection(port, host);
+ var stream = self.stream = net.createConnection(port, host);
stream.setNoDelay();
32 lib/handshake.js
View
@@ -77,8 +77,8 @@ exports.security = function (rfb, opts) {
.tap(function (vars) {
if (vars.secRes !== 0) {
this
- .getWord32be('msgLen')
- .getBuffer('msg', 'msgLen')
+ .word32be('msgLen')
+ .buffer('msg', 'msgLen')
.tap(function (vars) {
sys.log('Security handshake failed with message: '
+ vars.msg.toString()
@@ -95,22 +95,22 @@ exports.init = function (rfb, opts) {
})
.into('size', function () {
this
- .getWord16be('width')
- .getWord16be('height')
+ .word16be('width')
+ .word16be('height')
.tap(function (size) { rfb.dimensions = size })
})
.into('pf', function () {
this
- .getWord8('bitsPerPixel')
- .getWord8('depth')
- .getWord8('bigEndian')
- .getWord8('trueColor')
- .getWord16be('redMax')
- .getWord16be('greenMax')
- .getWord16be('blueMax')
- .getWord8('redShift')
- .getWord8('greenShift')
- .getWord8('blueShift')
+ .word8('bitsPerPixel')
+ .word8('depth')
+ .word8('bigEndian')
+ .word8('trueColor')
+ .word16be('redMax')
+ .word16be('greenMax')
+ .word16be('blueMax')
+ .word8('redShift')
+ .word8('greenShift')
+ .word8('blueShift')
.tap(function (pf) {
var bpp = depth = 24;
if (rfb.engine == 'tightvnc') {
@@ -131,8 +131,8 @@ exports.init = function (rfb, opts) {
})
})
.skip(3)
- .getWord32be('nameLength')
- .getBuffer('nameString', 'nameLength')
+ .word32be('nameLength')
+ .buffer('nameString', 'nameLength')
.tap(function (vars) {
Put() // tell the server the format we'd like to receive data in
.word8(clientMsgTypes.setPixelFormat)
Please sign in to comment.
Something went wrong with that request. Please try again.