b0VIM 7.3¾ MÒÙ¬rŸpgriesspgriess-mbp.local~pgriess/src/pgriess-node-websocket-client/lib/websocket.js 3210#"! Utpÿÿÿÿÿÿÿÿ}€þÿÿÿÿÿÿÿ�ýýÿÿÿÿÿÿÿp~üÿÿÿÿÿÿÿ\îJad/àÀ €dJ-îÜÛ®šŒ{kj3Û Ç Æ ¢  R  è ç ¸ š i U T  ô ó ³ n 7   Ù � œ e M ! ï î ¬ ¦ ¥ _ 9 8  ä¢^XW0óðïΫšx5/. ôñ©˜tdUT*þäÒ£uonOMLȹ‘okZ'ôÂ��€}|/âÂÁ˜—nE0/. hash.update(hs); hash.update(secretKeyHashValue(s2)); hash.update(secretKeyHashValue(s1)); var hash = crypto.createHash('md5'); assert.equal(hs.length, 8);var computeSecretKeySignature = function(s1, s2, hs) { // handshaking data.// Compute the secret key signature based on two secret key strings and some}; return hv; hv += String.fromCharCode((skv >> 0) & 0xff); hv += String.fromCharCode((skv >> 8) & 0xff); hv += String.fromCharCode((skv >> 16) & 0xff); hv += String.fromCharCode((skv >> 24) & 0xff); var hv = ''; var skv = secretKeyValue(sk);var secretKeyHashValue = function(sk) {// byte string// This takes the result of secretKeyValue() and encodes it in a big-endian//// Get the to-be-hashed value of a secret key string} return Math.floor(v / ns); } } v = v * 10 + cc - 0x30; } else if (0x30 <= cc && cc <= 0x39) { ns++; if (cc == 0x20) { var cc = sk.charCodeAt(i); for (var i = 0; i < sk.length; i++) { var v = 0; var ns = 0;var secretKeyValue = function(sk) {// spaces found.// This strips non-digit values and divides the result by the number of//// Get the value of a secret key string}; return c; } c += String.fromCharCode(Math.floor(Math.random() * 255)); for (var i = 0; i < 8; i++) { var c = ''; var createChallenge = function() {// Generate a challenge sequence}; return s; assert.notEqual(s.charAt(s.length), ' '); assert.notEqual(s.charAt(0), ' '); } s = s.substring(0, pos) + ' ' + s.substring(pos, s.length); var pos = Math.floor(Math.random() * (s.length - 1)) + 1; for (var i = 0; i < numSpaces; i++) { // Insert 'numSpaces' worth of spaces assert.equal(s.indexOf(' '), -1); // We shoudln't have any spaces in our value until we insert them } s = s.substring(0, pos) + c + s.substring(pos, s.length); String.fromCharCode((c - 14) + 0x3a); String.fromCharCode(c + 0x21) : c = (c <= 14) ? var c = Math.floor(Math.random() * (14 + 68)); var pos = Math.floor(Math.random() * s.length + 1); for (var i = 0; i < numChars; i++) { assert.ok(1 <= numChars && numChars <= 12); var numChars = 1 + Math.floor(Math.random() * 12); // [0x21, 0x2f] (14 characters) and [0x3a, 0x7e] (68 characters) // Insert 'numChars' worth of noise in the character ranges var s = keyVal.toString(); // Our string starts with a string representation of our key ) * numSpaces); Math.random() * (4294967295 / numSpaces) var keyVal = (Math.floor( // What is the numerical value of our key? assert.ok(1 <= numSpaces && numSpaces <= 12); var numSpaces = 1 + Math.floor(Math.random() * 12); // How many spaces will we be inserting?var createSecretKey = function() {// Generate a Sec-WebSocket-* value function() { }; function() { sys.error.apply(this, arguments); } :var debug = (debugLevel & 0x4) ?var debugLevel = parseInt(process.env.NODE_DEBUG, 16);var CLOSED = 3;var CLOSING = 2;var OPEN = 1;var CONNECTING = 0;// Values for readyState as per the W3C specvar FRAME_HI = 2;var FRAME_LO = 1;var FRAME_NO = 0;var sys = require('sys');var urllib = require('url');var net = require('net');var http = require('http');var events = require('events');var crypto = require('crypto');var buffer = require('buffer');var assert = require('assert');adõ IÔ½³°‚cb4øÈ’^]IH// vim:ts=4 sw=4 etsetConstant(WebSocket.prototype, 'CLOSED', CLOSED);setConstant(WebSocket.prototype, 'CLOSING', CLOSING);setConstant(WebSocket.prototype, 'OPEN', OPEN);setConstant(WebSocket.prototype, 'CONNECTING', CONNECTING);// Add some constants to the WebSocket objectexports.WebSocket = WebSocket;sys.inherits(WebSocket, events.EventEmitter);}; })(); httpReq.end(); httpReq.write(challenge, 'binary');