Burp Suite User Forum

Create new post

how do we calculate value for tranfer encoding??

Tanishq | Last updated: Apr 21, 2020 06:17AM UTC

POST / HTTP/1.1 Host: your-lab-id.web-security-academy.net Content-length: 4 Transfer-Encoding: chunked 87 GET /admin/delete?username=carlos HTTP/1.1 Host: localhost Content-Type: application/x-www-form-urlencoded Content-Length: 15 x=1 0 How the value 87 is caluclated??

Liam, PortSwigger Agent | Last updated: Apr 21, 2020 07:43AM UTC

The content can be broken up into a number of chunks; each of which is prefixed by its size in bytes. A zero size chunk indicates the end of the response message. If a server is using chunked encoding it must set the Transfer-Encoding header to "chunked". There is an example given on this page: - https://www.httpwatch.com/httpgallery/chunked/

abderrahmane | Last updated: Dec 29, 2021 11:32AM UTC

i got confused too at first but here is how to calculate it: 1- go to a "String Length Calculator" website ex : https://string-functions.com/length.aspx 2- paste this request : without the zero and click calculate GET /admin/delete?username=carlos HTTP/1.1 Host: localhost Content-Type: application/x-www-form-urlencoded Content-Length: 15 x=1 3- you will get a result : 135 ..... this is in decimal 4- now go to a "decimal to hexadecimal" converter website ex: https://www.rapidtables.com/convert/number/decimal-to-hex.html 5- convert 135 to hexadecimal you will get 87

| Last updated: Feb 01, 2022 09:03PM UTC

I would suggest to do it like abderrahmane mentioned. But to understand the string counting have a look at this: https://stackoverflow.com/questions/65914611/how-to-count-transfer-encoding-chunked-chunk-size

Liam, PortSwigger Agent | Last updated: Feb 02, 2022 11:51AM UTC

Thanks for the tip.

You must be an existing, logged-in customer to reply to a thread. Please email us for additional support.