如何获取所有traceroute ip node js

时间:2016-03-07 13:35:39

标签: javascript node.js ping traceroute

我需要在节点js中获取所有traceroute ip信息。我使用过npm install traceroute lib,但lib js文件存在这样的问题。

c:\Users\Frank\WebstormProjects\Whois.uz\server\node_modules\traceroute\traceroute.js:114
    lines.splice(0,i);
                ReferenceError: i is not defined
at Object.internals.Traceroute.trace.internals.parseOutput (c:\Users\Frank\WebstormProjects\Whois.uz\server\node_modules\traceroute\traceroute.js:114:24)
at c:\Users\Frank\WebstormProjects\Whois.uz\server\node_modules\traceroute\traceroute.js:35:39
at ChildProcess.exithandler (child_process.js:193:7)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:827:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at Pipe._onclose (net.js:475:12)

获得它的最佳方法是什么?谢谢!

0 个答案:

没有答案