如何在node.js中创建较低级别的网络数据包 [英] How to create lower level network packets in node.js

查看:93
本文介绍了如何在node.js中创建较低级别的网络数据包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在一个需要创建一些数据包的项目中工作,例如ICMP ECHO和其他可以启动TCP三向握手的数据包.做到Node.js的最佳方法是什么?我在node.js中没有看到任何像scappy(python)这样的数据包处理库.我现在所拥有的只是用于监视数据包的node-pcap.但是,如何从头开始创建新数据包?

Am working on a project where i require some packet creation, such as ICMP ECHO and other packets where I can start the TCP 3-way handshake. What is the best way to do it node.js? I don't see any packet manipulating libraries like scappy (python) in node.js. All i have for now is node-pcap which is used to monitor packets. But how do i create new packets from scratch?

推荐答案

node.js当前不提供原始套接字API,据我所知,还没有人将其实现为npm模块,所以我目前认为这不可能.

node.js doesn't currently offer a raw socket API, and as far as I'm aware, nobody has implemented it as an npm module yet either, so I don't think this is possible at the moment.

这篇关于如何在node.js中创建较低级别的网络数据包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆