Kein
Kein
CC#
Created by Kein on 4/17/2023 in #help
❔ HTTPclient fails to POST properly
@canton7 ah no, I figured it out, you need to force content type per payload:
new ByteArrayContent(data) { Headers = { {"Content-Disposition", @"form-data; name=""file""; filename=""12345.jpg"""}, {"Content-Type", "image/jpeg"} };
new ByteArrayContent(data) { Headers = { {"Content-Disposition", @"form-data; name=""file""; filename=""12345.jpg"""}, {"Content-Type", "image/jpeg"} };
39 replies
CC#
Created by Kein on 4/17/2023 in #help
❔ HTTPclient fails to POST properly
39 replies
CC#
Created by Kein on 4/17/2023 in #help
❔ HTTPclient fails to POST properly
If there is a way to avoid serializing rawstrings to bytes I will take it but otherwise I will go that way
39 replies
CC#
Created by Kein on 4/17/2023 in #help
❔ HTTPclient fails to POST properly
39 replies
CC#
Created by Kein on 4/17/2023 in #help
❔ HTTPclient fails to POST properly
nice, thanks!
39 replies
CC#
Created by Kein on 4/17/2023 in #help
❔ HTTPclient fails to POST properly
-----------------------------29077931424107458645579380474
Content-Disposition: form-data; name="uuid"

92da547b-ff8e-44af-aec5-f1c9f36ff65a
-----------------------------29077931424107458645579380474
Content-Disposition: form-data; name="batch"

R2N6cnpLdlRYUFU9
-----------------------------29077931424107458645579380474
Content-Disposition: form-data; name="file"; filename="12345.jpg"
Content-Type: image/jpeg
<BINARY_DATA_HERE>
-----------------------------29077931424107458645579380474
Content-Disposition: form-data; name="uuid"

92da547b-ff8e-44af-aec5-f1c9f36ff65a
-----------------------------29077931424107458645579380474
Content-Disposition: form-data; name="batch"

R2N6cnpLdlRYUFU9
-----------------------------29077931424107458645579380474
Content-Disposition: form-data; name="file"; filename="12345.jpg"
Content-Type: image/jpeg
<BINARY_DATA_HERE>
Do I need to compose it myself or is there a built-in boundary break
39 replies
CC#
Created by Kein on 4/17/2023 in #help
❔ HTTPclient fails to POST properly
@canton7 you have experience sending binay data (images) as mutipart form with boundary with HTTPclient?
39 replies
CC#
Created by Kein on 4/17/2023 in #help
❔ HTTPclient fails to POST properly
HTTPToolkit shows the request is pretty much exactly the same, sans Accept which I can add but it wont change anything
39 replies
CC#
Created by Kein on 4/17/2023 in #help
❔ HTTPclient fails to POST properly
Huh, so there is no default Accept: */* for httpclient
39 replies
CC#
Created by Kein on 4/17/2023 in #help
❔ HTTPclient fails to POST properly
Essentially my question boilds down if anyone else stepped on the same rakes and figured the differences out
39 replies
CC#
Created by Kein on 4/17/2023 in #help
❔ HTTPclient fails to POST properly
I dont think it has anything to do with it, I think it is some default client setup between curl and HTTPClient, the former just have it being sent by default because it is often used as REST API debugging tool so it makes sense to hone it for that case, where was HttpClient is too generic
39 replies
CC#
Created by Kein on 4/17/2023 in #help
❔ HTTPclient fails to POST properly
But yeah it does not make any sense for any header dot content do not match, I've printed the FormURLEncoded data and it is exactly what I send with cURL, same with the headers, cookie is added via DefaultRequestHeaders
39 replies
CC#
Created by Kein on 4/17/2023 in #help
❔ HTTPclient fails to POST properly
39 replies
CC#
Created by Kein on 4/17/2023 in #help
❔ HTTPclient fails to POST properly
lmao it does not work for my location, rip
39 replies
CC#
Created by Kein on 4/17/2023 in #help
❔ HTTPclient fails to POST properly
I've compared the headers, here aint that much to differ, Content-type, User-agent (not even needed but for posterity) and cookie, that is. I will try fiddler, hopefully it is less pain then BURP
39 replies
CC#
Created by Kein on 4/17/2023 in #help
❔ HTTPclient fails to POST properly
I was wondering may be someone who uses both curl and HTTP client knows where the former excels by default so I can just use the info
39 replies
CC#
Created by Kein on 4/17/2023 in #help
❔ HTTPclient fails to POST properly
200 OK which is a normal request to session/login page, should be 302 found + redirect I really dont want to spend gazzlion of effort for the next few days making BURP work with https, so I can just inspect difference in headers, it is pain
39 replies
CC#
Created by Kein on 4/17/2023 in #help
❔ HTTPclient fails to POST properly
curl works just fine
39 replies
CC#
Created by Kein on 1/10/2023 in #help
❔ Pinging hundred of hosts sequentially
I'm somewhat mimicking existing app that does the same, and it yields close to perfect results. I offloaded Ping to async version and situation became a bit better but I still get 5-6 timeouts on average. If I ping said hosts immediately after that they responsed 100%
4 replies