UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

#1 2007-10-16 01:38 PM

felix
Member
Registered: 2003-12-04
Posts: 171

Re: How to _spy_ a socket file?

Offline

#2 2007-10-16 10:48 PM

RobSeace
Administrator
From: Boston, MA
Registered: 2002-06-12
Posts: 3,839
Website

Re: How to _spy_ a socket file?

No, it's not really possible to sniff Unix domain socket traffic, in the same manner
as one can easily sniff real network traffic...

However, if you have appropriate privs, you could do something like write a wrapper
shared library that implements your own versions of recv()/send() (or read()/write(),
or whatever the app uses), and logs all the data transfered, before calling the real
function...  You'd load the app with "LD_PRELOAD=yourlib" set, so you could
override the real functions...

Offline

#3 2007-10-18 09:18 PM

felix
Member
Registered: 2003-12-04
Posts: 171

Re: How to _spy_ a socket file?

Offline

#4 2007-10-18 10:57 PM

RobSeace
Administrator
From: Boston, MA
Registered: 2002-06-12
Posts: 3,839
Website

Re: How to _spy_ a socket file?

Offline

#5 2007-10-25 03:10 AM

felix
Member
Registered: 2003-12-04
Posts: 171

Re: How to _spy_ a socket file?

Offline

#6 2007-10-25 01:28 PM

RobSeace
Administrator
From: Boston, MA
Registered: 2002-06-12
Posts: 3,839
Website

Re: How to _spy_ a socket file?

Offline

#7 2007-10-28 01:13 AM

felix
Member
Registered: 2003-12-04
Posts: 171

Re: How to _spy_ a socket file?

Offline

Board footer

Powered by FluxBB