Ask Your Question

How to find size of file downloaded?

asked 2019-02-16 00:57:40 +0000

SunMan gravatar image

I am looking for a step by step demo to know how to find the size of file downloaded.

Let's say I am downloading this and the file after download shows as 1,443,680 bytes = 1410KB = 1.37 MB.

Can someone do a demo on how to find/calculate this size using wireshark? I need this to find out an issue where large files fail to download and I am suspecting that it is downloading partially.

thanks in advance... SunMan

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2019-02-19 01:09:51 +0000

Spooky gravatar image


This will be difficult because is using HTTPS.

If the file was downloaded over HTTP then you could simply check the size before exporting it from the capture using

File - Export Objects - HTTP...

You would see the size (in KB) for your file.

(You may need to enable "Allow subdissector to reassemble TCP streams" in TCP protocol preferences)

But because this 7-zip file is served over HTTPS everything is encrypted.

You can always "eyeball it" by using "Follow TCP." (CTRL+ALT+SHIFT+T)

Using the correct TCP stream index, you can "follow" the TCP stream in a new Window that displays the data.

This data is encrypted but Wireshark does calculate the size of this "conversation.”

In the bottom left corner there is a drop-down menu.

Select the correct direction (Probably SERVER_IP:443 -> YOUR_IP:YOUR_PORT)

You should see the size of all the packets for that direction.

It won't be equal the exact size of your file because of the packet headers.

Assuming headers for Ethernet (14), IPv4 (20) and TCP (20) you can multiply the number of packets for that direction by 54.

This will more or less precisely give you the size of all the packet headers.

So if you need a 1000 packets to transfer the file than you may subtract 54 000 bytes from the size of the conversation in "Follow TCP" for that direction. (About 52,7 KB)

This should give you something close to the "real" size.

Hope this helps.



edit flag offensive delete link more


size of all the packets for that direction --> is 332 bytes. I think there is just one packet. is there anyway I can share the trace with you?

I have uploaded trace here:!AtGs0pMyD6owgyX4q...

SunMan gravatar imageSunMan ( 2019-02-20 01:33:38 +0000 )edit


I looked at the PCAP.

It looks like something is wrong on the client (browser) side because we see it sends TLS 1.2 Encrypted Alerts followed by FIN, ACK. It's encrypted so I can't tell you what the alert is but we know it is enough to stop the transfer.

See frames 23, 155 and 157. (Looks like you tried 3 times.)

To see only each trials: eq 1 eq 9 eq 10

Did you try using another browser or even another PC?

I see that there is about 160 ms of latency between your host and the server.

You can add a column "Delta Time Displayed" of type "Delta time displayed" to see that latency between TCP segments.

(In TCP preferences, check "Analyze TCP sequence numbers" and "Calculate conversation timestamp.”)

I don't know if this is expected but ...(more)

Spooky gravatar imageSpooky ( 2019-02-25 23:48:45 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-02-16 00:57:40 +0000

Seen: 78 times

Last updated: Feb 19