blob: ae78b815daee92c6877db861c1b7373330dfceb3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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.payload_type//' solec.lua
cat <<EOT >> solec.lua
local tcp_port = DissectorTable.get("tcp.port")
tcp_port:add(9999, proto)
EOT
|