1
1
mirror of https://github.com/wader/fq.git synced 2024-08-17 16:00:41 +03:00

pyrdp: Add doc and move init func to top

This commit is contained in:
Mattias Wadman 2024-06-14 20:51:35 +02:00
parent 6caa7fa78b
commit a1fb076248
4 changed files with 32 additions and 10 deletions

View File

@ -138,7 +138,7 @@ prores_frame,
[protobuf](doc/formats.md#protobuf),
protobuf_widevine,
pssh_playready,
pyrdp,
[pyrdp](doc/formats.md#pyrdp),
[rtmp](doc/formats.md#rtmp),
sll2_packet,
sll_packet,

View File

@ -110,6 +110,7 @@
|[`protobuf`](#protobuf) |Protobuf |<sub></sub>|
|`protobuf_widevine` |Widevine&nbsp;protobuf |<sub>`protobuf`</sub>|
|`pssh_playready` |PlayReady&nbsp;PSSH |<sub></sub>|
|[`pyrdp`](#pyrdp) |PyRDP&nbsp;Replay&nbsp;Files |<sub></sub>|
|[`rtmp`](#rtmp) |Real-Time&nbsp;Messaging&nbsp;Protocol |<sub>`amf0` `mpeg_asc`</sub>|
|`sll2_packet` |Linux&nbsp;cooked&nbsp;capture&nbsp;encapsulation&nbsp;v2 |<sub>`inet_packet`</sub>|
|`sll_packet` |Linux&nbsp;cooked&nbsp;capture&nbsp;encapsulation |<sub>`inet_packet`</sub>|
@ -1195,6 +1196,16 @@ $ fq -d protobuf '.fields[6].wire_value | protobuf | d' file
### References
- https://developers.google.com/protocol-buffers/docs/encoding
## pyrdp
PyRDP Replay Files.
### Authors
- Olivier Bilodeau <olivier.bilodeau@flare.io>, Maintainer
- Lisandro Ubiedo, Author
### References
- https://github.com/GoSecure/pyrdp
## rtmp
Real-Time Messaging Protocol.

View File

@ -10,6 +10,7 @@
package pyrdp
import (
"embed"
"time"
"github.com/wader/fq/format"
@ -19,6 +20,19 @@ import (
"github.com/wader/fq/pkg/scalar"
)
//go:embed pyrdp.md
var pyrdpFS embed.FS
func init() {
interp.RegisterFormat(
format.PYRDP,
&decode.Format{
Description: "PyRDP Replay Files",
DecodeFn: decodePYRDP,
})
interp.RegisterFS(pyrdpFS)
}
const (
READ_EXTRA = true
@ -91,15 +105,6 @@ var pduParsersMap = map[uint16]interface{}{
// PDU_FILE_DOWNLOAD_COMPLETE: pyrdp_pdu.ParseFileDownloadComplete,
}
func init() {
interp.RegisterFormat(
format.PYRDP,
&decode.Format{
Description: "PyRDP Replay Files",
DecodeFn: decodePYRDP,
})
}
func decodePYRDP(d *decode.D) any {
d.Endian = decode.LittleEndian

6
format/pyrdp/pyrdp.md Normal file
View File

@ -0,0 +1,6 @@
### Authors
- Olivier Bilodeau <olivier.bilodeau@flare.io>, Maintainer
- Lisandro Ubiedo, Author
### References
- https://github.com/GoSecure/pyrdp