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?