1

I use a program regularly on Linux that makes a TCP request when it starts up and updates a file with an access token before launching. I'd like to write a batch script that makes this request (using curl or something) and does a few other things before launching the program, but I'm having a problem logging the full path of the URL being requested by the program.

I know how to log outgoing TCP traffic with netstat (netstat -vWcep --protocol=tcp) and with tcpdump (tcpdump -i wlan0 -P out -v -w logfile.pcap). Both of these programs only log the host name of outgoing requests. For example, I know the request is to s3-1.amazonaws.com, but I need to know what comes after that. I may also need to know what kind of data is being posted.

How can I do this?

  • did you try tcpdump with -vvvX ? (side note: there are no URLs in tcp, only address and port; urls are an application layer thing) – guido Jan 23 '15 at 9:06
  • @guido yes. I realized in my sleep last night that I probably need a proxy. – David Kennedy Jan 23 '15 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.