A group of friends asked for help, but the needs that were not solved in a week were solved in 3 minutes

Hits: 0

Article directory

⛳️ Actual combat scene

This blog is still a group of friends asking for help. The problem described is that data cannot be sent through Python. Let’s give him a landing.

The target site is an IP address that involves privacy, and the address must be coded.

https: // target_site_ip :30443/api /v1/file /upload/ ?sessionid= 00000042

The data displayed on the open page is as follows: In the
actual combat test, you can select a file to send, and the captured request is as follows.

Let’s extract the relevant request data:
request address

https: //hide IP:30443 / api /v1/file /upload/

request method


request parameter


Important parameters of the request header
Because it involves file uploading requests, filesyou can directly add parameters in the module.

import requests

headers = {
    "Content-Type": "multipart/form-data; "
files = {
    "file": open("1.png", "rb")

As a result, the direct request was successful.

{"code":"200","FileId": "62eb738c61f1e" }

Well, finish the task and call it a day.

It should be noted here that sessionidsince urlthe already exists in , it can be ignored and not passed when requesting.

There is a thumbs up in the lower right corner, the likes are doubled

Welcome to subscribe to the column:

You may also like...

Leave a Reply

Your email address will not be published.