Skip to content

Can the length field be added to the data frame of the http2 message? #747

@huaixia777

Description

@huaixia777

Hello, I observe that the payload of the data frame of the http2 packet only contains content but no length information.
Is it possible to add a length field? Maybe something like this

[root@xxx]# ./bin/ecapture-ctyun tls
2025-02-24T15:12:43+08:00 INF AppName="eCapture(旁观者)"
2025-02-24T15:12:43+08:00 INF HomePage=https://ecapture.cc
2025-02-24T15:12:43+08:00 INF Repository=https://github.com/gojue/ecapture
2025-02-24T15:12:43+08:00 INF Author="CFC4N <cfc4ncs@gmail.com>"
2025-02-24T15:12:43+08:00 INF Description="Capturing SSL/TLS plaintext without a CA certificate using eBPF. Supported on Linux/Android kernels for amd64/arm64."
2025-02-24T15:12:43+08:00 INF Version=linux_amd64:v0.9.3-20250210-dcfc3cf:x86_64
2025-02-24T15:12:43+08:00 INF Listen=localhost:28256
2025-02-24T15:12:43+08:00 INF eCapture running logs logger=
2025-02-24T15:12:43+08:00 INF the file handler that receives the captured event eventCollector=
2025-02-24T15:12:43+08:00 INF listen=localhost:28256
2025-02-24T15:12:43+08:00 INF https server starting...You can upgrade the configuration file via the HTTP interface.
2025-02-24T15:12:43+08:00 WRN Kernel version is less than 5.2, Process filtering parameters do not take effect such as pid/uid. kernel=4.19.90
2025-02-24T15:12:43+08:00 INF Kernel Info=4.19.90 Pid=1790837
2025-02-24T15:12:43+08:00 INF BTF bytecode mode: non-CORE. btfMode=0
2025-02-24T15:12:43+08:00 INF master key keylogger has been set. eBPFProgramType=Text keylogger=
2025-02-24T15:12:43+08:00 INF module initialization. isReload=false moduleName=EBPFProbeOPENSSL
2025-02-24T15:12:43+08:00 INF Module.Run()
2025-02-24T15:12:43+08:00 INF origin versionKey="openssl 1.1.1f" versionKeyLower="openssl 1.1.1f"
2025-02-24T15:12:43+08:00 INF OpenSSL/BoringSSL version found Android=false library version="openssl 1.1.1f"
2025-02-24T15:12:43+08:00 INF Hook masterKey function ElfType=2 Functions=["SSL_get_wbio","SSL_in_before","SSL_do_handshake"] binrayPath=/lib64/libssl.so.1.1
2025-02-24T15:12:43+08:00 WRN Your kernel version is less than 5.2, GlobalVar is disabled, the following parameters will be ignored:[target_pid, target_uid, target_port]
2025-02-24T15:12:43+08:00 INF setupManagers eBPFProgramType=Text
2025-02-24T15:12:43+08:00 INF BPF bytecode file is matched. bpfFileName=user/bytecode/openssl_1_1_1d_kern_noncore_less52.o
2025-02-24T15:12:44+08:00 INF perfEventReader created mapSize(MB)=4
2025-02-24T15:12:44+08:00 INF perfEventReader created mapSize(MB)=4
2025-02-24T15:12:44+08:00 INF module started successfully. isReload=false moduleName=EBPFProbeOPENSSL
2025-02-24T15:13:01+08:00 ??? UUID:680600_680600_nginx_5_1_192.168.20.38:50704-192.168.10.41:4443, Name:HTTP2Response, Type:4, Length:577

Frame Type      =>      SETTINGS
Frame StreamID  =>      0

Frame Type      =>      WINDOW_UPDATE
Frame StreamID  =>      0

Frame Type      =>      SETTINGS
Frame StreamID  =>      0

Frame Type      =>      HEADERS
Frame StreamID  =>      1
header field ":status" = "200"
header field "server" = "nginx/1.21.5"
header field "date" = "Mon, 24 Feb 2025 07:12:59 GMT"
header field "content-type" = "text/plain"
header field "content-length" = "12"
header field "last-modified" = "Mon, 23 Dec 2024 02:20:35 GMT"
header field "etag" = "\"6768c8f3-c\""
header field "accept-ranges" = "bytes"

Frame Type      =>      DATA
Frame StreamID  =>      1
Frame Length      =>      11
hello world

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions