add sample data

このコミットが含まれているのは:
AJ ONeal 2017-01-20 18:15:16 -07:00
コミット 4a1ea2d791
22個のファイルの変更69行の追加0行の削除

57
mdns-udp-capturer.js ノーマルファイル
ファイルの表示

@ -0,0 +1,57 @@
'use strict';
// pass a terminal arg
var type = process.argv[2] || 'unknown';
var count = parseInt(process.argv[3]) || 0;
if (!type) {
console.error("Usage: node aj-listener.js <type> [count]");
console.error("Example: node aj-listener.js _service 0");
process.exit(1);
}
var PromiseA = require('bluebird');
var fs = PromiseA.promisifyAll(require('fs'));
var dgram = require('dgram');
var server = dgram.createSocket({
type: 'udp4'
, reuseAddr: true
});
var handlers = {};
handlers.onError = function (err) {
console.error("error:", err.stack);
server.close();
};
handlers.onMessage = function (buffer) {
var name;
if (!count) {
name = type + '-' + count + '.mdns.bin';
}
else {
// probably the same device name responding
name = type + '-' + buffer.length + '.mdns.bin';
}
fs.writeFileAsync(name, buffer).then(function () {
console.log('wrote ' + buffer.length + ' bytes to ' + name);
});
};
handlers.onListening = function () {
/*jshint validthis:true*/
var server = this;
console.log(server.address());
server.setBroadcast(true);
server.addMembership('224.0.0.251');
};
server.on('error', handlers.onError);
server.on('message', handlers.onMessage);
server.on('listening', handlers.onListening);
// 53 dns
// 5353 mdns
server.bind(5353);

12
samples/README.md ノーマルファイル
ファイルの表示

@ -0,0 +1,12 @@
These samples were captured by running a generic udp listener and then running dig to create a query.
Most likely the 0th samples are the query from dig and the other immediately numbered samples are responses to that query...
However, devices broadcast mDNS packets pretty much at random, so there'll be some other goodies in there too.
```
dig @224.0.0.251 -p 5353 -t ptr _services._dns-sd._udp.local
dig @224.0.0.251 -p 5353 -t ptr _ssh._tcp.local
dig @224.0.0.251 -p 5353 -t ptr _sftp-ssh._tcp.local
dig @224.0.0.251 -p 5353 -t A bowie._sftp-ssh._tcp.local
```

バイナリ
samples/a-0.mdns.bin ノーマルファイル

バイナリファイルは表示されません。

バイナリ
samples/a-1.mdns.bin ノーマルファイル

バイナリファイルは表示されません。

バイナリ
samples/random-0.mdns.bin ノーマルファイル

バイナリファイルは表示されません。

バイナリ
samples/random-1.mdns.bin ノーマルファイル

バイナリファイルは表示されません。

バイナリ
samples/random-2.mdns.bin ノーマルファイル

バイナリファイルは表示されません。

バイナリ
samples/random-3.mdns.bin ノーマルファイル

バイナリファイルは表示されません。

バイナリ
samples/services-0.mdns.bin ノーマルファイル

バイナリファイルは表示されません。

バイナリ
samples/services-1.mdns.bin ノーマルファイル

バイナリファイルは表示されません。

バイナリ
samples/services-2.mdns.bin ノーマルファイル

バイナリファイルは表示されません。

バイナリ
samples/services-3.mdns.bin ノーマルファイル

バイナリファイルは表示されません。

バイナリ
samples/sftp-ssh-0.mdns.bin ノーマルファイル

バイナリファイルは表示されません。

バイナリ
samples/sftp-ssh-1.mdns.bin ノーマルファイル

バイナリファイルは表示されません。

バイナリ
samples/sftp-ssh-2.mdns.bin ノーマルファイル

バイナリファイルは表示されません。

バイナリ
samples/sftp-ssh-3.mdns.bin ノーマルファイル

バイナリファイルは表示されません。

バイナリ
samples/sftp-ssh-4.mdns.bin ノーマルファイル

バイナリファイルは表示されません。

バイナリ
samples/sftp-ssh-5.mdns.bin ノーマルファイル

バイナリファイルは表示されません。

バイナリ
samples/ssh-ptr-0.mdns.bin ノーマルファイル

バイナリファイルは表示されません。

バイナリ
samples/ssh-ptr-1.mdns.bin ノーマルファイル

バイナリファイルは表示されません。

バイナリ
samples/ssh-ptr-3.mdns.bin ノーマルファイル

バイナリファイルは表示されません。

バイナリ
samples/ssh-ptr-4.mdns.bin ノーマルファイル

バイナリファイルは表示されません。