TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Looking for tool/language to describe data/packet structures

19 点作者 tinktank超过 2 年前
I&#x27;m looking or a tool that will allow me to textually describe data&#x2F;packet structures for the purposes of creating visual representations of the structures. If it&#x27;s capable of expressing constraints or assertations that would be even better. Examples of constraints&#x2F;assertions:<p>- This field should always be n bits into the start of the structure - The size of this structure shouldn&#x27;t exceed B bits - This field should never be less than s bits<p>The capability to output image formats directly is preferred, but I&#x27;m not opposed to having to script it and tie it up to an image generation library.<p>I&#x27;d prefer a CLI tool so the flow is all on my local machine.

4 条评论

jiveturkey超过 2 年前
<a href="http:&#x2F;&#x2F;interactive.blockdiag.com&#x2F;packetdiag&#x2F;" rel="nofollow">http:&#x2F;&#x2F;interactive.blockdiag.com&#x2F;packetdiag&#x2F;</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;arnoldrobbins&#x2F;dformat">https:&#x2F;&#x2F;github.com&#x2F;arnoldrobbins&#x2F;dformat</a>
codegladiator超过 2 年前
Checkout kaitai<p><a href="https:&#x2F;&#x2F;doc.kaitai.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;doc.kaitai.io&#x2F;</a><p>Its not for generating visual structure, but just defining the structure with the constraints like you mentioned
cookiengineer超过 2 年前
In the network security space there&#x27;s pcap-ng and yara that&#x27;s pretty common as a network filter ruleset generator.<p>There&#x27;s also a lof of visual IDEs for the creation of yara rules, which tend to break it down in a flow-based graph so that the logical conditions are easier to understand.<p>Yara is pretty flexible in what you can do with it, a lot of anti malware tools use it for detection, as well as more modern hex editors like ImHex.<p>Older-generation tech used to use snort and its rule format, especially in the Enterprise space it&#x27;s (sadly) still common.
renewiltord超过 2 年前
Protocol exists but is unmaintained (I think) <a href="https:&#x2F;&#x2F;www.luismg.com&#x2F;protocol&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.luismg.com&#x2F;protocol&#x2F;</a><p>Wavedrom and ascii wave is for tming <a href="https:&#x2F;&#x2F;github.com&#x2F;Wren6991&#x2F;asciiwave">https:&#x2F;&#x2F;github.com&#x2F;Wren6991&#x2F;asciiwave</a>