@@ -325,7 +325,7 @@ To achieve this functionality, the `find_library_path` function is first used to
325325 if (env.openssl) {
326326 char *openssl_path = find_library_path("libssl.so");
327327 printf("OpenSSL path: %s\n", openssl_path);
328- attach_openssl(obj, "/lib/x86_64-linux-gnu/libssl.so.3" );
328+ attach_openssl(obj, openssl_path );
329329 }
330330 if (env.gnutls) {
331331 char *gnutls_path = find_library_path("libgnutls.so");
@@ -353,7 +353,7 @@ The specific `attach` functions are as follows:
353353 skel->links.prog_name = bpf_program__ attach_uprobe_opts( \
354354 skel->progs.prog_name, env.pid, binary_path, 0, &uprobe_opts); \
355355 } while (false)
356-
356+
357357int attach_openssl (struct sslsniff_bpf * skel, const char * lib) {
358358 ATTACH_UPROBE_CHECKED(skel, lib, SSL_write, probe_SSL_rw_enter);
359359 ATTACH_URETPROBE_CHECKED(skel, lib, SSL_write, probe_SSL_write_exit);
@@ -421,9 +421,9 @@ void print_event(struct probe_SSL_data_t *event, const char *evt) {
421421 if (buf_size != 0) {
422422 if (env.hexdump) {
423423 // 2 characters for each byte + null terminator
424- char hex_data[ MAX_BUF_SIZE * 2 + 1] = {0};
424+ char hex_data[ MAX_BUF_SIZE * 2 + 1] = {0};
425425 buf_to_hex((uint8_t * )buf, buf_size, hex_data);
426-
426+
427427 printf("\n%s\n", s_mark);
428428 for (size_t i = 0; i < strlen(hex_data); i += 32) {
429429 printf("%.32s\n", hex_data + i);
@@ -485,7 +485,7 @@ Under normal circumstances, you will see output similar to the following:
485485After executing the ` curl ` command, ` sslsniff ` will display the following content:
486486
487487``` txt
488- READ/RECV 0.132786160 curl 47458 1256
488+ READ/RECV 0.132786160 curl 47458 1256
489489 ----- DATA -----
490490 <!doctype html>
491491 ...
@@ -511,7 +511,7 @@ OpenSSL path: /lib/x86_64-linux-gnu/libssl.so.3
511511GnuTLS path: /lib/x86_64-linux-gnu/libgnutls.so.30
512512NSS path: /lib/x86_64-linux-gnu/libnspr4.so
513513FUNC TIME(s) COMM PID LEN LAT(ms)
514- HANDSHAKE 0.000000000 curl 6460 1 1.384 WRITE/SEND 0.000115400 curl 6460 24 0.014
514+ HANDSHAKE 0.000000000 curl 6460 1 1.384 WRITE/SEND 0.000115400 curl 6460 24 0.014
515515```
516516
517517### Hexadecimal Output
@@ -520,7 +520,7 @@ To display data in hexadecimal format, execute the following command:
520520
521521``` console
522522$ sudo ./sslsniff --hexdump
523- WRITE/SEND 0.000000000 curl 16104 24
523+ WRITE/SEND 0.000000000 curl 16104 24
524524----- DATA -----
525525505249202a20485454502f322e300d0a
5265260d0a534d0d0a0d0a
0 commit comments