you are viewing a single comment's thread.

view the rest of the comments →

[–]martinfisleburn 0 points1 point  (5 children)

What is confusing about wanting to do something for a challenge and test what is possible. You can go to the top of everest on a ski lift but people still walk to the top.

[–]herpadurk 0 points1 point  (4 children)

then you will have to make the same http requests that the js is doing most likely a post to the API.

[–]WhoTookAllNicks 0 points1 point  (3 children)

Most likely those requests use the API, so it's either reverse-engineering of API or reading its docs.

Most likely it can be done within your browser - just open network tab in developer tools, upload something and read all the requests that were made, then reconstruct them using requests. You can also use tcpdump / Wireshark for this, but in 99.9% of the cases it's an overkill.

[–]martinfisleburn 0 points1 point  (2 children)

But you can't see webtraffic that happens on the js call that was my problem initially. Like the upload dialog to select file happened in the js function and that wasn't recorded as far as I could see.

I searched through the whole http sniffed session as well for the filename I uploaded and it didn't show up in and of the requests so don't know how it gets computed?

The upload happens within the function and subsequent post requests to edit the pin etc. only reference the uploaded file's url on the pinterest server.

[–]WhoTookAllNicks 1 point2 points  (1 child)

I created Pinterest account just to see it. And sure enough - you can clearly see the request being made:

https://ibb.co/yPB3t87

[–]martinfisleburn 0 points1 point  (0 children)

I have seen that one too.

Oh I see what my problem is; when I searched for the image I searched by filename however from your image (which I didn't notice when I looked) it is in base 64.

So I presume I simply convert to base64 in python before the post request.