views:

106

answers:

1

Hi,

I have a java application that downloads a file from a remote server. I would like to know where the application actually downloads a file. I tried to capture tcp/ip packet and I found out below information.

protocol: TCP
remote address: xxx.xxx.xxx.xx
local port: xxxx
remote port: xxxxx

I know exact file url now. However, when I try to access the file using web browser I see "internet explorer cannot display the webpage".

since the application is compiled by java, there must be a way to do it in c#.

please advise me..

Thanks!

+2  A: 

Just because the Java application is able to download the file doesn't mean they're doing it via HTTP. The fact that IE fails to display anything useful suggests it's not HTTP, although that's no guarantee.

You should look at how the Java application downloads the file, and determine the protocol - that should tell you how to do the same thing from C#.

Of course, this is assuming you have the code for the Java application. If you don't, but you think the authors would be happy for you to download the file with your own code in C#, I suggest you email them to ask them the protocol. If they don't want you accessing the file other than with their application, I'd personally respect their wishes.

Jon Skeet
isn't it TCP ? SmartSniff(packet capture) shows it as TCP
Moon
TCP is a low-level protocol - you need to know the higher-level protocol. Most internet protocols work over TCP.
Jon Skeet
@Jon Skeet// Thanks! I learned a lot.
Moon