How to find out the URL to which a process is trying to connect to?

0

I have a program that is downloading some files from the Internet transparently (I don't know from where the files are downloading). I want to find out the URL of those files that are currently downloading. Is that possible?

I use Windows 7.

alimammadi123

Posted 2016-07-29T19:01:14.893

Reputation: 11

Question was closed 2016-08-05T23:35:57.240

2This is extremely vague... What is your operating system, what is the protocol? If Linux, you could try tcpdump, if Windows, you could try wireshark; if this is over SSL, you will have a difficult time determining the destination through simple packet inspection. – Matt Clark – 2016-07-29T19:17:09.150

@Matt Clark I added the operating system details on the question, but I have no idea about the protocol though. – alimammadi123 – 2016-07-29T19:21:55.560

ahem.. wireshark. – Matt Clark – 2016-07-29T19:22:31.993

Do you have a process (running program) that's actively downloading files? Or do you have a program that already downloaded files and you want to know where they came from? As written, your question seems to be asking both. – I say Reinstate Monica – 2016-07-29T19:25:17.243

1@Twisty, the first case, a process that's actively downloading files. – alimammadi123 – 2016-07-29T19:26:40.373

@MattClark Wireshark (or more generally, a packet sniffer) can't tell you the URL that a file is being downloaded from unless you capture the first few packets of the HTTP connection. OP says those files that are currently downloading which seems to me to indicate that there is a download in progress; that's a far tougher nut to crack. – a CVn – 2016-07-29T20:00:41.053

@MichaelKjörling correct, the sniffer would have to be running when the download is initiated - i gave the only answers I could given OPs vague post. – Matt Clark – 2016-07-29T20:03:21.993

1@alimammadi123 Are you interested in knowing the exact URL used to initiate the download of each file, or the Internet hostname from which the file(s) are being downloaded? My answer provides the latter but not the former. – I say Reinstate Monica – 2016-07-29T20:06:49.337

@Twisty, Thank you for your answer, I want to know the exact URL, if possible. – alimammadi123 – 2016-07-29T20:41:38.513

Answers

1

There are plenty of tools that can tell you what hosts a process is connected to. Netstat is one, Process Explorer is another.

But to find the exact URL? The only way to do that is to use a packet sniffer and watch for HTTP GET messages. The message header will have the URL of the resource being requested.

Wes Sayeed

Posted 2016-07-29T19:01:14.893

Reputation: 12 024