{"_id":"spies","_rev":"31-3c40b60b36cea2ab6ca10780ab6e5b35","name":"spies","description":"spy on a running program","dist-tags":{"latest":"0.1.6"},"versions":{"0.1.1":{"name":"spies","version":"0.1.1","dependencies":{},"repository":{"type":"git","url":"git://github.com/mafintosh/spies"},"description":"spy on a running program","keywords":["repl","shell","nc"],"author":{"name":"Mathias Buus Madsen","email":"mathiasbuus@gmail.com"},"readme":"# spies\n\nSpy on a running node program by having a man on the inside\n\n\tnpm install spies\n\nThe first thing you need is to setup a spy inside your program\n\n``` js\nvar spies = require('spies');\n\nspies(9999, function(spy) {\n\tspy.on('echo', function(value) {\n\t\tspy.log(value);\n\t});\n\tspy.on('load-avg', function() {\n\t\tspy.log(require('os').loadavg());\n\t});\n});\n```\n\nAfterwards you can use `netcat` to contact and debrief your spy\n\n\tnc localhost 9999\n\nThis starts a `repl` where you can type in commands\n\n\thelp\n\t$ : help\n\t  : watch\n\t  : echo\n\t  : load-avg\n\n`help` and `watch` are build in commands than print the help and runs the same command every 1 second.\nYou invoke a command simply typing it and pressing `enter` and the result will be pretty printed below.\n\n\tload-avg\n\t$ : 0.30126953125\n\t  : 0.3203125\n\t  : 0.33642578125\n\nTo pass arguments to the commands simply seperate them them by a `space`\n\n\techo hello\n\t$ : hello","readmeFilename":"README.md","_id":"spies@0.1.1","dist":{"shasum":"31b27a66c7cfd63cd3fc34b617172eb8f8bec6a2","tarball":"https://registry.npmjs.org/spies/-/spies-0.1.1.tgz","integrity":"sha512-U33oTO/mKZaBek6sNQ+0Pigj/0a55OfjSq+9/cs1Mt2N9unK2cRgsuJiULsJ2cJRaSeywrCXJLbiPEc484nwuA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVz7ZcRZD4MFY0F2ccj6xcmM41zD4CD/IbqpvetxJgWgIgVPndhRYmmVrHKHb49ExqVI0HbTyE+ljAJQtIXbUTdtc="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"directories":{}},"0.1.2":{"name":"spies","version":"0.1.2","dependencies":{},"repository":{"type":"git","url":"git://github.com/mafintosh/spies"},"description":"spy on a running program","keywords":["repl","shell","nc"],"author":{"name":"Mathias Buus Madsen","email":"mathiasbuus@gmail.com"},"readme":"# spies\n\nSpy on a running node program by having a man on the inside\n\n\tnpm install spies\n\nThe first thing you need is to setup a spy inside your program\n\n``` js\nvar spies = require('spies');\n\nspies(9999, function(spy) {\n\tspy.on('echo', function(value) {\n\t\tspy.log(value);\n\t});\n\tspy.on('load-avg', function() {\n\t\tspy.log(require('os').loadavg());\n\t});\n});\n```\n\nAfterwards you can use `netcat` to contact and debrief your spy\n\n\tnc localhost 9999\n\nThis starts a `repl` where you can type in commands\n\n\thelp\n\t$ : help\n\t  : watch\n\t  : echo\n\t  : load-avg\n\n`help` and `watch` are build in commands than print the help and runs the same command every 1 second.\nYou invoke a command simply typing it and pressing `enter` and the result will be pretty printed below.\n\n\tload-avg\n\t$ : 0.30126953125\n\t  : 0.3203125\n\t  : 0.33642578125\n\nTo pass arguments to the commands simply seperate them them by a `space`\n\n\techo hello\n\t$ : hello","readmeFilename":"README.md","_id":"spies@0.1.2","dist":{"shasum":"daf27dca0fea07fbe56a454b4216c8ecd4cf51ba","tarball":"https://registry.npmjs.org/spies/-/spies-0.1.2.tgz","integrity":"sha512-cgnOBfvHFg6bAmz2cO1sT0cyoDuuW2SDZvVLP8p6Hpx1VCaVQmk/vXLVEN8OI+CMeui+/+Y8x+jiCpjNdhuKOw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFp0Sib6QFEMS3lwANU6ASwToCoXq+XibTfWOEcYUPZpAiAxBDy0HsUkkHlDa3qjPvODws/IG+2gFhmi6AAVeJOZ7Q=="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"directories":{}},"0.1.3":{"name":"spies","version":"0.1.3","dependencies":{},"repository":{"type":"git","url":"git://github.com/mafintosh/spies"},"description":"spy on a running program","keywords":["repl","shell","nc"],"author":{"name":"Mathias Buus Madsen","email":"mathiasbuus@gmail.com"},"readme":"# spies\n\nSpy on a running node program by having a man on the inside\n\n\tnpm install spies\n\nThe first thing you need is to setup a spy inside your program\n\n``` js\nvar spies = require('spies');\nvar net = require('net');\n\nnet.createServer(function(socket) {\n\tvar spy = spies();\n\n\tspy.on('echo', function() {\n\t\tspy.log(Array.prototype.slice.call(arguments));\n\t});\n\tspy.on('load-avg', function() {\n\t\tspy.log(require('os').loadavg());\n\t});\n\n\tsocket.pipe(spy).pipe(socket);\n}).listen(9999);\n```\n\nAs you can see `spy` is simply a readable and writable stream so you can pipe to any kind of stream transport (like a websocket)\n\nYou can use the `spies.listen` helper if you just want to listen using a tcp server\n\n``` js\nspies.listen(9999, function(spy) {\n\t// attach commands here\n});\n```\n\nAfterwards you can use `netcat` to contact and debrief your spy\n\n\tnc localhost 9999\n\nThis starts a `repl` where you can type in commands\n\n\thelp\n\t$ : help\n\t  : watch\n\t  : echo\n\t  : load-avg\n\n`help` and `watch` are build in commands than print the help and runs the same command every 1 second.\nYou invoke a command simply typing it and pressing `enter` and the result will be pretty printed below.\n\n\tload-avg\n\t$ : 0.30126953125\n\t  : 0.3203125\n\t  : 0.33642578125\n\nTo pass arguments to the commands simply seperate them them by a `space`\n\n\techo hello\n\t$ : hello","readmeFilename":"README.md","_id":"spies@0.1.3","dist":{"shasum":"fffbbfb44a1be7997f20ab45e4542cd454f8b73c","tarball":"https://registry.npmjs.org/spies/-/spies-0.1.3.tgz","integrity":"sha512-tq5v0TeAES3nwR82e548jT5AYXodvukx8G7gzvbILBEmiIJ9OUdNZRa/K2JE7Tr0dMq+oUo1z1hTkcMgFIRVsQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIERoH0zZJiLyuXVieDincBICE2wBPEu/kGPp5rs2un/wAiEA8b140JShlmged69wNt/BEV90fJxRL6XCFGpimGPoG/o="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"directories":{}},"0.1.4":{"name":"spies","version":"0.1.4","dependencies":{},"repository":{"type":"git","url":"git://github.com/mafintosh/spies"},"description":"spy on a running program","keywords":["repl","shell","nc","stream"],"author":{"name":"Mathias Buus Madsen","email":"mathiasbuus@gmail.com"},"readme":"# spies\n\nSpy on a running node program by having a man on the inside\n\n\tnpm install spies\n\nThe first thing you need is to setup a spy inside your program\n\n``` js\nvar spies = require('spies');\nvar net = require('net');\n\nnet.createServer(function(socket) {\n\tvar spy = spies();\n\n\tspy.on('echo', function() {\n\t\tspy.log(Array.prototype.slice.call(arguments));\n\t});\n\tspy.on('load-avg', function() {\n\t\tspy.log(require('os').loadavg());\n\t});\n\n\tsocket.pipe(spy).pipe(socket);\n}).listen(9999);\n```\n\nAs you can see `spy` is simply a readable and writable stream so you can pipe to any kind of stream transport (like a websocket)\n\nYou can use the `spies.listen` helper if you just want to listen using a tcp server\n\n``` js\nspies.listen(9999, function(spy) {\n\t// attach commands here\n});\n```\n\nAfterwards you can use `netcat` to contact and debrief your spy\n\n\tnc localhost 9999\n\nThis starts a `repl` where you can type in commands\n\n\thelp\n\t$ : help\n\t  : watch\n\t  : echo\n\t  : load-avg\n\n`help` and `watch` are build in commands than print the help and runs the same command every 1 second.\nYou invoke a command simply typing it and pressing `enter` and the result will be pretty printed below.\n\n\tload-avg\n\t$ : 0.30126953125\n\t  : 0.3203125\n\t  : 0.33642578125\n\nTo pass arguments to the commands simply seperate them them by a `space`\n\n\techo hello\n\t$ : hello","readmeFilename":"README.md","_id":"spies@0.1.4","dist":{"shasum":"92a2f954f0f4c4d5d80297221d0018f37ab1f6b5","tarball":"https://registry.npmjs.org/spies/-/spies-0.1.4.tgz","integrity":"sha512-yk/9e9Ck4+fN01u7a7hzimpzZ8Axz4lEgBAHc0YELqb5hI+bVXrGaFUmAl3G55JrPHLjgZfsLEKzgOq/hzvJ1w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGerhIRs0Y+F+V590tA75xFWnBp7PmqCO14OacvRUqCQIhALkC5q2WZkWQgkGaE76LWiIOiQpCXvw5nTuWmdziMmKa"}]},"_npmVersion":"1.1.65","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"directories":{}},"0.1.5":{"name":"spies","version":"0.1.5","dependencies":{},"repository":{"type":"git","url":"git://github.com/mafintosh/spies"},"description":"spy on a running program","keywords":["repl","shell","nc","stream"],"author":{"name":"Mathias Buus Madsen","email":"mathiasbuus@gmail.com"},"readme":"# spies\n\nSpy on a running node program by having a man on the inside\n\n\tnpm install spies\n\nThe first thing you need is to setup a spy inside your program\n\n``` js\nvar spies = require('spies');\nvar net = require('net');\n\nnet.createServer(function(socket) {\n\tvar spy = spies();\n\n\tspy.on('echo', function() {\n\t\tspy.log(Array.prototype.slice.call(arguments));\n\t});\n\tspy.on('load-avg', function() {\n\t\tspy.log(require('os').loadavg());\n\t});\n\n\tsocket.pipe(spy).pipe(socket);\n}).listen(9999);\n```\n\nAs you can see `spy` is simply a readable and writable stream so you can pipe to any kind of stream transport (like a websocket)\n\nYou can use the `spies.listen` helper if you just want to listen using a tcp server\n\n``` js\nspies.listen(9999, function(spy) {\n\t// attach commands here\n});\n```\n\nAfterwards you can use `netcat` to contact and debrief your spy\n\n\tnc localhost 9999\n\nThis starts a `repl` where you can type in commands\n\n\thelp\n\t$ : help\n\t  : watch\n\t  : echo\n\t  : load-avg\n\n`help` and `watch` are build in commands than print the help and runs the same command every 1 second.\nYou invoke a command simply typing it and pressing `enter` and the result will be pretty printed below.\n\n\tload-avg\n\t$ : 0.30126953125\n\t  : 0.3203125\n\t  : 0.33642578125\n\nTo pass arguments to the commands simply seperate them them by a `space`\n\n\techo hello\n\t$ : hello","readmeFilename":"README.md","_id":"spies@0.1.5","dist":{"shasum":"d80b29657a23a0ec87d7b8d5cb653fb24f773697","tarball":"https://registry.npmjs.org/spies/-/spies-0.1.5.tgz","integrity":"sha512-9xFS2RUip95a6+7mBXgh11+iHYi0w3wCSu83bEDXEBF6ktR2gPoRIuyPxIl2/LO3+0EAzI5aWk1QiVDjRTjcCA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHcAqVXkx64YwOyRXV94oPKLZC6Ps+CM12rNVDeSK6rqAiBEMKVbe+OpV1f6dW2A553W7anPkSPl3tdT1OK+4bPDVQ=="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}]},"0.1.6":{"name":"spies","version":"0.1.6","dependencies":{},"repository":{"type":"git","url":"git://github.com/mafintosh/spies"},"description":"spy on a running program","keywords":["repl","shell","nc","stream"],"author":{"name":"Mathias Buus Madsen","email":"mathiasbuus@gmail.com"},"readme":"# spies\n\nSpy on a running node program by having a man on the inside\n\n\tnpm install spies\n\nThe first thing you need is to setup a spy inside your program\n\n``` js\nvar spies = require('spies');\nvar net = require('net');\n\nnet.createServer(function(socket) {\n\tvar spy = spies();\n\n\tspy.on('echo', function() {\n\t\tspy.log(Array.prototype.slice.call(arguments));\n\t});\n\tspy.on('load-avg', function() {\n\t\tspy.log(require('os').loadavg());\n\t});\n\n\tsocket.pipe(spy).pipe(socket);\n}).listen(9999);\n```\n\nAs you can see `spy` is simply a readable and writable stream so you can pipe to any kind of stream transport (like a websocket)\n\nYou can use the `spies.listen` helper if you just want to listen using a tcp server\n\n``` js\nspies.listen(9999, function(spy) {\n\t// attach commands here\n});\n```\n\nAfterwards you can use `netcat` to contact and debrief your spy\n\n\tnc localhost 9999\n\nThis starts a `repl` where you can type in commands\n\n\thelp\n\t$ : help\n\t  : watch\n\t  : echo\n\t  : load-avg\n\n`help` and `watch` are build in commands than print the help and runs the same command every 1 second.\nYou invoke a command simply typing it and pressing `enter` and the result will be pretty printed below.\n\n\tload-avg\n\t$ : 0.30126953125\n\t  : 0.3203125\n\t  : 0.33642578125\n\nTo pass arguments to the commands simply seperate them them by a `space`\n\n\techo hello\n\t$ : hello","readmeFilename":"README.md","_id":"spies@0.1.6","dist":{"shasum":"6094beb3548ceebd090fc5a77df5a65d372235b8","tarball":"https://registry.npmjs.org/spies/-/spies-0.1.6.tgz","integrity":"sha512-om8OlSQhCktL/EOgkd1/hsNiWX9+TgDhEdxnTuPgrV2UXUjpuqfkR3LZA/RmYwFewriVH0NiV8dqQgCe0suTcA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIED+itJ+OwAkQB2p0bTV5xUFHunog9zfWE85vJpDV4BVAiEAknw7GYjrqRHp2DQDtNutrO6q8ymbW2UU4j1BznLC2Yc="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}]}},"readme":"# spies\n\nSpy on a running node program by having a man on the inside\n\n\tnpm install spies\n\nThe first thing you need is to setup a spy inside your program\n\n``` js\nvar spies = require('spies');\n\nspies(9999, function(spy) {\n\tspy.on('echo', function(value) {\n\t\tspy.log(value);\n\t});\n\tspy.on('load-avg', function() {\n\t\tspy.log(require('os').loadavg());\n\t});\n});\n```\n\nAfterwards you can use `netcat` to contact and debrief your spy\n\n\tnc localhost 9999\n\nThis starts a `repl` where you can type in commands\n\n\thelp\n\t$ : help\n\t  : watch\n\t  : echo\n\t  : load-avg\n\n`help` and `watch` are build in commands than print the help and runs the same command every 1 second.\nYou invoke a command simply typing it and pressing `enter` and the result will be pretty printed below.\n\n\tload-avg\n\t$ : 0.30126953125\n\t  : 0.3203125\n\t  : 0.33642578125\n\nTo pass arguments to the commands simply seperate them them by a `space`\n\n\techo hello\n\t$ : hello","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"time":{"modified":"2022-06-26T22:52:02.669Z","created":"2012-11-10T10:18:53.282Z","0.1.1":"2012-11-10T10:18:55.064Z","0.1.2":"2012-11-10T22:35:07.779Z","0.1.3":"2012-11-10T23:43:16.003Z","0.1.4":"2012-11-10T23:49:14.592Z","0.1.5":"2012-11-12T20:56:07.267Z","0.1.6":"2012-11-16T02:44:21.345Z"},"author":{"name":"Mathias Buus Madsen","email":"mathiasbuus@gmail.com"},"repository":{"type":"git","url":"git://github.com/mafintosh/spies"}}