{"id":6645,"date":"2025-11-05T12:41:08","date_gmt":"2025-11-05T10:41:08","guid":{"rendered":"https:\/\/skeletor.org.ua\/?p=6645"},"modified":"2025-11-05T12:41:36","modified_gmt":"2025-11-05T10:41:36","slug":"socket-dump","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=6645","title":{"rendered":"socket dump"},"content":{"rendered":"\n<p>\u042f\u043a \u0436\u0435 \u0434\u0438\u0432\u0438\u0442\u0438\u0441\u044f \u0442\u0440\u0430\u0444\u0456\u043a, \u044f\u043a\u0449\u043e \u0437\u02bc\u0454\u0434\u043d\u0430\u043d\u043d\u044f \u0439\u0434\u0435 \u0447\u0435\u0440\u0435\u0437 <strong>unix socket<\/strong>? \u041d\u0438\u0436\u0447\u0435 \u043c\u0438 \u0440\u043e\u0437\u0433\u043b\u044f\u043d\u0435\u043c\u043e \u0434\u0435\u044f\u043a\u0456 \u043c\u0435\u0442\u043e\u0434\u0438 \u0432\u0438\u0440\u0456\u0448\u0435\u043d\u043d\u044f \u0446\u044c\u043e\u0433\u043e \u043f\u0438\u0442\u0430\u043d\u043d\u044f.<\/p>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#6d9107\" class=\"has-inline-color\">socat<\/mark><\/strong><\/p>\n\n\n\n<p>\u0422\u0443\u0442 \u0456\u0434\u0435\u044f \u043f\u0440\u043e\u0441\u0442\u0430: \u0434\u0443\u0431\u043b\u044e\u0454\u043c\u043e \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0456\u043a \u043d\u0430 <strong>tcp socket<\/strong> \u0456 \u0434\u0430\u043b\u0456 \u0432\u0436\u0435 \u0447\u0435\u0440\u0435\u0437 <strong>tcpdump<\/strong> \u0434\u0438\u0432\u0438\u043c\u043e\u0441\u044f:<\/p>\n\n\n\n<p><code>socat -v UNIX-LISTEN:\/path\/to\/some.sock,fork TCP-CONNECT:127.0.0.1:8090<\/code><\/p>\n\n\n<p><!--more--><\/p>\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#6d9107\" class=\"has-inline-color\">unixdump<\/mark><\/strong> (<a href=\"https:\/\/pypi.org\/project\/unixdump\/\">https:\/\/pypi.org\/project\/unixdump\/<\/a>)<\/p>\n\n\n\n<p>\u0410 \u0442\u0443\u0442 \u043c\u043e\u0436\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443 \u0447\u0438\u0442\u0430\u0442\u0438<\/p>\n\n\n\n<p><code>unixdump -b -s '\/tmp\/domain-socket'<\/code><\/p>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#6d9107\" class=\"has-inline-color\">sockdump<\/mark><\/strong> (<a href=\"https:\/\/github.com\/mechpen\/sockdump\">https:\/\/github.com\/mechpen\/sockdump<\/a>)<\/p>\n\n\n\n<p>\u0426\u044f \u0443\u0442\u0438\u043b\u0456\u0442\u0430 \u043f\u043e\u0454\u0434\u043d\u0443\u0454 2 \u043f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u0456: \u043c\u043e\u0436\u043d\u0430 \u0447\u0438\u0442\u0430\u0442\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443, \u0430 \u043c\u043e\u0436\u043d\u0430 \u0456 \u0432 <strong>pcap<\/strong> \u0456 \u0434\u0430\u043b\u0456 \u0434\u0438\u0432\u0438\u0442\u0438\u0441\u044f \u0447\u0435\u0440\u0435\u0437 <strong>tcpdump\/wireshark\/&#8230;<\/strong><\/p>\n\n\n\n<p><code>sockdump.py --format string \/var\/run\/docker.sock<\/code><\/p>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#6d9107\" class=\"has-inline-color\">watch-unix-socket.stp<\/mark><\/strong> (<a href=\"https:\/\/gist.github.com\/robbmanes\/47b902512dbcaa9c068e4ed9b5a3bc72\">https:\/\/gist.github.com\/robbmanes\/47b902512dbcaa9c068e4ed9b5a3bc72<\/a>)<\/p>\n\n\n\n<p>\u0446\u0435 \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 <strong>SystemTap<\/strong>, \u044f\u043a\u0438\u0439 \u0434\u043e\u0437\u0432\u043e\u043b\u044f\u0454 \u043f\u0435\u0440\u0435\u0445\u043e\u043f\u043b\u044e\u0432\u0430\u0442\u0438 \u0434\u0430\u043d\u0456 \u0437 <strong>unix socket<\/strong><\/p>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#6d9107\" class=\"has-inline-color\">udptrace<\/mark><\/strong> <a href=\"https:\/\/github.com\/laf0rge\/udtrace\">https:\/\/github.com\/laf0rge\/udtrace<\/a><\/p>\n\n\n\n<p>\u0410 \u0446\u0435 \u0432\u0436\u0435 \u0431\u0456\u0431\u043b\u0456\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u044f\u043a\u0430 \u0434\u043e\u0437\u0432\u043e\u043b\u044f\u0454 \u0442\u0440\u0430\u0441\u0443\u0432\u0430\u0442\u0438 \u0434\u0430\u043d\u0456 \u0447\u0435\u0440\u0435\u0437 <strong>unix socket<\/strong><\/p>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#6d9107\" class=\"has-inline-color\">remusock<\/mark><\/strong> (<a href=\"https:\/\/github.com\/Zirias\/remusock\">https:\/\/github.com\/Zirias\/remusock<\/a>)<\/p>\n\n\n\n<p>\u0410 \u0446\u044f \u0443\u0442\u0438\u043b\u0456\u0442\u0430 \u0434\u043e\u0437\u0432\u043e\u043b\u044f\u0454 \u043f\u0456\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u0438\u0441\u044f \u0432\u0456\u0434\u0434\u0430\u043b\u0435\u043d\u043e \u0434\u043e <strong>unix socket&#8217;y <\/strong>\u043f\u043e \u043c\u0435\u0440\u0435\u0436\u0456.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u042f\u043a \u0436\u0435 \u0434\u0438\u0432\u0438\u0442\u0438\u0441\u044f \u0442\u0440\u0430\u0444\u0456\u043a, \u044f\u043a\u0449\u043e \u0437\u02bc\u0454\u0434\u043d\u0430\u043d\u043d\u044f \u0439\u0434\u0435 \u0447\u0435\u0440\u0435\u0437 unix socket? \u041d\u0438\u0436\u0447\u0435 \u043c\u0438 \u0440\u043e\u0437\u0433\u043b\u044f\u043d\u0435\u043c\u043e \u0434\u0435\u044f\u043a\u0456 \u043c\u0435\u0442\u043e\u0434\u0438 \u0432\u0438\u0440\u0456\u0448\u0435\u043d\u043d\u044f \u0446\u044c\u043e\u0433\u043e \u043f\u0438\u0442\u0430\u043d\u043d\u044f. socat \u0422\u0443\u0442 \u0456\u0434\u0435\u044f \u043f\u0440\u043e\u0441\u0442\u0430: \u0434\u0443\u0431\u043b\u044e\u0454\u043c\u043e \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0456\u043a \u043d\u0430 tcp socket \u0456 \u0434\u0430\u043b\u0456 \u0432\u0436\u0435 \u0447\u0435\u0440\u0435\u0437 tcpdump \u0434\u0438\u0432\u0438\u043c\u043e\u0441\u044f: socat -v UNIX-LISTEN:\/path\/to\/some.sock,fork TCP-CONNECT:127.0.0.1:8090<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-6645","post","type-post","status-publish","format-standard","hentry","category-others"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/6645","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6645"}],"version-history":[{"count":1,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/6645\/revisions"}],"predecessor-version":[{"id":6646,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/6645\/revisions\/6646"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}