diff options
| author | bt <bt@rctt.net> | 2026-03-14 23:11:15 +0100 |
|---|---|---|
| committer | bt <bt@rctt.net> | 2026-03-18 16:21:58 +0100 |
| commit | 54ddec67c477a6fd73b0f623258c0849ba695b88 (patch) | |
| tree | 3a34b67e62b8788f0611abc4f9f8cfe7954aae46 /tools/build_spec.sh | |
| parent | 8932846aa4d29d59fd208f40bbfd44d1bb9cf1ff (diff) | |
| download | solec-54ddec67c477a6fd73b0f623258c0849ba695b88.tar.gz solec-54ddec67c477a6fd73b0f623258c0849ba695b88.zip | |
Basic server implementation
Diffstat (limited to 'tools/build_spec.sh')
| -rwxr-xr-x | tools/build_spec.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/build_spec.sh b/tools/build_spec.sh new file mode 100755 index 0000000..dfebbd2 --- /dev/null +++ b/tools/build_spec.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +if [[ "$OSTYPE" == "darwin"* ]]; then + SED=gsed +else + SED=sed +fi + +kaitai-struct-compiler -t graphviz solec.ksy +dot -Tsvg solec.dot > solec.svg +rm solec.dot + +~/bin/kaitai-struct-compiler-ws/bin/kaitai-struct-compiler -t wireshark --read-pos solec.ksy + +${SED} -i -e '5s/.*/package.path = "kaitai_struct_lua_runtime\/?.lua" .. package.path/' solec.lua +${SED} -i -e 's/, self.type_payload//' solec.lua + +cat <<EOT >> solec.lua +local tcp_port = DissectorTable.get("tcp.port") +tcp_port:add(9999, proto) +EOT + |
