Answer the question
In order to leave comments, you need to log in
How to log in to a site with certificate verification, bypassing the certificate selection window?
There is a personal account of Rosfinmonitoring, in which a personal certificate is used to enter. I want to know what other ways there are to transfer / accept this certificate, in addition to brute-force pressing the accept button using some kind of Pyautogui. .
Any method that does not require key/mouse emulation will do. Is it possible to pass it as a parameter to get/post? If yes, how to implement it?
Answer the question
In order to leave comments, you need to log in
import json
import requests
clientCrt = "cc.crt"
clientKey = "ck.key"
url = "https://example.com/api"
payload = { "someId": "myID" }
certServer = 'cs.crt'
headers = {'content-type': 'application/json'}
r = requests.post(url, data=json.dumps(payload), verify=certServer, headers=headers, cert=(clientCrt, clientKey))
print(r.status_code)
print(r.json())
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question