解码数据包 [英] Decode a Packet

查看:98
本文介绍了解码数据包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人

我正在制作自己的应用程序以接收来自NSE服务器的数据包,并且我在其中取得了成功.但是我的问题是所有数据包都是字节格式.现在,我如何获得任何公司(抄写)的实时报价来解码这些数据包.当我将这些字节存储在文本文件中时,它看起来像是:

? YZ ** 123 @

我如何从中获取实时供稿.如果有人知道请帮助我吗?

谢谢和问候
Raghvendra kumar Roy

Dear all

I am making my own application to receive packet from NSE sever and i am success in it. But my problem is all the packets is in byte format. now how can I get LIVE quotes of any company(scrips)to decode these packets. When I store these bytes in text file it looks like :

 YZ**123 @

How can I get Live feed from this . If anybody know pls help me?

Thanks and regards
Raghvendra kumar Roy

推荐答案

NSE已记录了各种数据包的整体结构.您需要经历一下.没有该文档,您将无法做进一步的事情.我的意思是.而且,您的想法并不是那么容易.


好吧,看到我帮不上忙.
但请参阅
根据文档,第一个字符是NETID.现在您的数据包显示第一个字符为4.保留下一个字符.接下来的2个字节表示数据包的编号.在这里,您应该注意数据包中包含的数据类型(例如UINT,SHORT,LONG和DOUBLE),它们占据了一个以上的字节,应将它们绞在一起(字节反转).因此,在将2个字节的数据包中的2个字节捻转之后,您将得到1.这意味着该数据包包含一个数据包.等等.
请注意,数据包可能包含压缩/解压缩的数据,也可能两者都包含.
很抱歉,我无法再为您提供帮助.

现在浏览文档并继续.

祝你好运
[结束编辑]
NSE has documented the whole structures of all kind of packets. You need to go through that. Without that documentation you will not be able to do anything further. And I mean that. And moreover its not that easy what you are thinking at all.


OK, See i cant help you al the way.
But see
As per the documentation The first char is the NETID. Now your packet says the first char is 4. Leave the next char. The next 2 bytes denotes the no of packet. Here you should take a note the data types such as UINT, SHORT, LONG and DOUBLE contained in a packet, which occupy more than one byte should be twiddled (byte reversed). So after twiddling the 2 bytes of no of packet you will get 1. That means the packet contain one Packet. And so on.
Note the packet may contain compressed/decompressed data or may be both.
I am sorry I cant help you any further.

Now go through the document and carry on.

Good luck
[ END EDIT]


浏览下面的链接..,这可能会解决您的问题

http://nmap.org/book/nse-library.html [ http://nmap.org/nsedoc/lib/dns.html [
Go through the below links .., this may slove your problem

http://nmap.org/book/nse-library.html[^]

http://nmap.org/nsedoc/lib/dns.html[^]


包"是什么意思? ?您是否正在从NSE服务器通过TCP/IP获取原始二进制数据?没有关于数据包中数据格式的文档,您只是在猜测自己必须要做的事情,我们也是.
What do you mean "packet"?? Are you getting raw binary data over TCP/IP from the NSE server? Without the documentation on the format of the data in the packet, you''re just guessing at what you have to do, and so would we.


这篇关于解码数据包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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