Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nodetunes

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodetunes - npm Package Compare versions

Comparing version 0.0.18 to 0.0.19

3

CHANGELOG.md
Changelog
---------
##### 0.0.19
- Removed dependency on ursa package.
##### 0.0.18

@@ -5,0 +8,0 @@ - Locked down dependencies, moved to mdns package

6

examples/server_multiple.js

@@ -11,9 +11,9 @@ "use strict";

stream.on('data', function(d) {
process.stdout.write('\rWriting for Server 1: ' + d.length + ' bytes @ ' + new Date().getTime() + '\t');
process.stdout.write('\rWriting for Server 1: ' + d.length + ' bytes @ ' + new Date().getTime() + '\t');
})
});
server2.on('clientConnected', function(stream) {
server2.on('clientConnected', function(stream) {
stream.on('data', function(d) {
process.stdout.write('\rWriting for Server 2: ' + d.length + ' bytes @ ' + new Date().getTime() + '\t');
process.stdout.write('\rWriting for Server 2: ' + d.length + ' bytes @ ' + new Date().getTime() + '\t');
})

@@ -20,0 +20,0 @@ });

@@ -16,2 +16,2 @@ "use strict";

server.start();
server.start();
"use strict";
var ursa = require('ursa');
var forge = require('node-forge');
var rsa = forge.pki.rsa;
var fs = require('fs');

@@ -68,4 +70,12 @@ var crypto = require('crypto');

var privkey = ursa.createPrivateKey(fs.readFileSync(__dirname + '/../private.key'));
var getPrivateKey = function() {
var keyFile = fs.readFileSync(__dirname + '/../private.key');
var privkey = forge.pki.privateKeyFromPem(keyFile);
return privkey;
};
var privateKey = getPrivateKey();
var generateAppleResponse = function(challengeBuf, ipAddr, macAddr) {

@@ -79,7 +89,7 @@ var fullChallenge = Buffer.concat([ challengeBuf, ipAddr, macAddr ]);

}
fullChallenge = Buffer.concat([ fullChallenge, new Buffer(padding) ]);
var response = privkey.privateEncrypt(fullChallenge, 'base64', 'base64');
fullChallenge = Buffer.concat([ fullChallenge, new Buffer(padding) ]).toString('binary');
var response = forge.pki.rsa.encrypt(fullChallenge, privateKey, 0x01);
return response;
return forge.util.encode64(response);
};

@@ -100,2 +110,2 @@

module.exports.generateRfc2617Response = generateRfc2617Response;
module.exports.rsaOperations = privkey;
module.exports.rsaPrivateKey = privateKey;

@@ -25,3 +25,2 @@ "use strict";

// pull method processors
this.methodMapping = require('./rtspmethods')(this);

@@ -43,3 +42,2 @@

parser.on('message', function(req, res) {
//console.log(socket.id, 'received req:', req.method);

@@ -73,3 +71,3 @@ res.set('CSeq', req.getHeader('CSeq'));

this.self.rtp.stop();
this.self.external.emit('clientDisconnected');
this.self.external.emit('clientDisconnected');
}

@@ -76,0 +74,0 @@

@@ -78,3 +78,3 @@ "use strict";

if (sp[0] == 'rsaaeskey') {
rtspServer.audioAesKey = tools.rsaOperations.decrypt(new Buffer(sp[1], 'base64'));
rtspServer.audioAesKey = tools.rsaPrivateKey.decrypt(new Buffer(sp[1], 'base64').toString('binary'), 'RSA-OAEP');
} else if (sp[0] == 'aesiv') {

@@ -94,3 +94,3 @@ rtspServer.audioAesIv = new Buffer(sp[1], 'base64');

}
rtspServer.clientName = sdp.i;

@@ -107,3 +107,3 @@

rtspServer.ports = [];
var getRandomPort = function() {

@@ -157,3 +157,3 @@ var min = 5000;

if (req.getHeader('Content-Type') == 'application/x-dmap-tagged') {
// metadata dmap/daap format

@@ -165,3 +165,3 @@ var dmapData = tools.parseDmap(req.content);

} else if (req.getHeader('Content-Type') == 'image/jpeg') {
rtspServer.metadata.artwork = req.content;

@@ -183,3 +183,3 @@ rtspServer.external.emit('artworkChange', req.content);

rtspServer.external.emit('progressChange', rtspServer.metadata.progress);
}

@@ -186,0 +186,0 @@

@@ -71,5 +71,5 @@ "use strict";

if (callback) {
callback(null, {
port: port,
macAddress: this.options.macAddress,
callback(null, {
port: port,
macAddress: this.options.macAddress,
});

@@ -76,0 +76,0 @@

{
"name": "nodetunes",
"version": "0.0.18",
"version": "0.0.19",
"author": "Stephen Wan <stephen@stephenwan.net>",
"description": "AirTunes v2 Music Server",
"description": "AirTunes v2 Server Implementation",
"contributors": [

@@ -24,11 +24,12 @@ {

"dependencies": {
"forge": "^2.2.0",
"httplike": "0.0.8",
"ip": "0.3.2",
"mdns": "2.2.0",
"ursa": "0.8.0",
"ip": "0.3.2",
"metricstream": "0.0.0",
"node-forge": "^0.6.16",
"portastic": "0.0.1",
"priorityqueuejs": "0.2.0",
"portastic": "0.0.1",
"randomstring": "1.0.3",
"httplike": "0.0.8",
"random-mac": "0.0.4",
"metricstream": "0.0.0"
"randomstring": "1.0.3"
},

@@ -35,0 +36,0 @@ "devDependencies": {

@@ -28,3 +28,3 @@ var net = require('net');

beforeEach(function(done) {
beforeEach(function(done) {
client = new net.Socket();

@@ -98,3 +98,3 @@ parser = new Parser(client);

parser.on('message', function(m) {
assert(m.protocol === 'RTSP/1.0');
assert(m.protocol === 'RTSP/1.0');
assert(m.statusCode === 200);

@@ -136,3 +136,3 @@ assert(m.statusMessage === 'OK');

assert(server.rtspServer.audioCodec === codec);
assert(server.rtspServer.audioAesKey.toString('base64') === helper.rsaOperations.decrypt(new Buffer(rsaAesKey, 'base64')).toString('base64'));
assert(server.rtspServer.audioAesKey.toString('base64') === helper.rsaPrivateKey.decrypt(new Buffer(rsaAesKey, 'base64').toString('binary'), 'RSA-OAEP').toString('base64'));
assert(server.rtspServer.audioAesIv.toString('base64') === rsaAesIv);

@@ -154,3 +154,3 @@ assert(server.rtspServer.metadata.clientName === 'Stephen\'s iPad');

assert(server.rtspServer.audioCodec === codec);
assert(server.rtspServer.audioAesKey.toString('base64') === helper.rsaOperations.decrypt(new Buffer(rsaAesKey, 'base64')).toString('base64'));
assert(server.rtspServer.audioAesKey.toString('base64') === helper.rsaPrivateKey.decrypt(new Buffer(rsaAesKey, 'base64').toString('binary'), 'RSA-OAEP').toString('base64'));
assert(server.rtspServer.audioAesIv.toString('base64') === rsaAesIv);

@@ -172,3 +172,3 @@ done();

assert(server.rtspServer.audioCodec === codec);
assert(server.rtspServer.audioAesKey.toString('base64') === helper.rsaOperations.decrypt(new Buffer(rsaAesKey, 'base64')).toString('base64'));
assert(server.rtspServer.audioAesKey.toString('base64') === helper.rsaPrivateKey.decrypt(new Buffer(rsaAesKey, 'base64').toString('binary'), 'RSA-OAEP').toString('base64'));
assert(server.rtspServer.audioAesIv.toString('base64') === rsaAesIv);

@@ -307,3 +307,3 @@ done();

});
var content = 'bawkbawk';

@@ -323,3 +323,3 @@

});
var content = 'bawkbawk';

@@ -326,0 +326,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc