Selenium-Wire Your Connection Is Not Secure - python

I'm using selenium-wire with undetectable chromedriver and it's giving me: "Your Connection To This Site Is Not Secure" when I go into a site, and the https in the website address is crossed over, and it's saying that the certificate is invalid. The website's certificate is, however, not invalid. When I go into the website on my normal browser, it works as it should. I have noticed this happening on all https websites, i.e. https://httpbin.org/headers and https://google.com/, etc.
import seleniumwire.undetected_chromedriver as uc
if __name__ == '__main__':
options = uc.ChromeOptions()
driver = uc.Chrome(
options=options,
seleniumwire_options={}
)
driver.get('https://httpbin.org/headers')
This doesn't give me a popup or anything and I can still use the site normally, but I would like to get it fixed.
How can I go about fixing this?

Install the certificate in chrome. You can get the certificate using python -m seleniumwire extractcert or you can download that from https://raw.githubusercontent.com/wkeeling/selenium-wire/master/seleniumwire/proxy/ca.crt
How to install the certificate.
Open Chrome settings
Search Manage Certificates and open that
Click on “Trusted Root Certification Authorities”
Import the certificate you just have downloaded.

Related

How do I fix this: Your connection isn't private

When I try to enter my webpage I get this in Chrome and Edge.
I have the https.
security
error
You need to configure a certificate for your web app. Under the "Security" section on your web app configuration page.

Snowflake Python connection using externalbrowser authenticator

I have code to connect to Snowflake through Python using external browser authentication (authenticator parameter set to 'externalbrowser')
I also have installed snowflake-connector-python version 2.3.5
On my machine running snowflake.connector.connect displays the following message, but doesn't open any browser windows to do the authentication:
"Initiating login request with your identity provider. A browser window should have opened for you to complete the login. If you can't see it, check existing browser windows, or your OS settings. Press CTRL+C to abort and try again..."
On my old machine it displays the same message, but opens a browser window to log in. What do you think can be causing this problem, and what can I do to fix this? Am I missing a package?
You want to try the troubleshooting suggested by Snowflake blog here EXTERNAL BROWSER SSO FROM CONNECTOR FAILS ON REDIRECT BACK TO LOCALHOST
I ran into the same issue, and do not set parameter "authenticator" to 'externalbrowser', if its optional you can remove this parameter and test.
after i remove "authenticator" parameter from my config file, I was able to authneticate and establish connection to snowflake.
You can try by allowing the pop up in your browser in the system settings

Python Selenium - Proxy with authentication on headless mode

I need to run proxies that requires authentication on selenium in headless mode.
I think many people are aware of the answer given on this post and it does work very well honestly But only In NON Headless Mode. As extensions are no longer supported in headless mode how to set proxy with authentication in selenium chromedriver python?
Besides that method, another very good method to run proxies that works in headless mode is by using the module selenium-wire. However, selenium-wire can only run in HTTP. To run HTTPS you would need to import a generated certificate into google chrome. So you cant run HTTPS programmatically.
Is there any good options to run proxies with authentication in headless mode? I'm sure many of us are wondering the same thing.
Thanks!

Install a trusted root certificate in PhantomJS

Is it possible to start a selenium PhantomJS session with a specific certificate?
Right now if I run it with PhantomJS I get Missing certficate. Adding --ignore-ssl-errors is not an option, this site needs the certificate.
I can use Chrome or Firefox and install the certificate first and then call webdriver.Chrome() and it will work, but is it possible to do this with PhantomJS?
I assume that you mean the use of client certificates, not the specification of other trusted CAs for validation of the servers certificate. Client certificates are not implemented (see what is the correct way to feed an ssl certificate into phantomjs) while different trusted CA can be specified with the --ssl-certificates-path option.

Using mechanize to visit a site that requires SSL

I need to visit a site (https://*) that requires me to install two certificates in Firefox before I can visit it successfully. One I can export as a .p12 file (Client Certificate), and one is a .crt file (CA Certificate). If I try accessing this site without these certificates, I get a "failed handshake error".
How do I visit this site in Python? I was thinking of using mechanize. Thanks.
I'd suggest you use webdriver to automate Firefox. It has a Python interface too.

Categories

Resources