'How to change password in script converted to exe?

I converted a .py file to .exe, now the problem is that script contains passwords and I imported it from another file, but after I converted the file it become the default password.

What if I have to change password? How can I make it import password even after conversion to .exe? Below is the example of the script.

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from time import sleep
import os
from webdriver_manager.chrome import ChromeDriverManager
import tabula
import glob
import Passwords
def cred(id1, pass1, fol_name):

    driver.get(url)
    sleep(2)

    username_box = driver.find_element_by_id('email')
    username_box.send_keys(id1)
    print("Email Id entered")
    sleep(1)

    password_box = driver.find_element_by_id('password')
    password_box.send_keys(pass1)
    print("Password entered")
data = {'[email protected]':[Passwords.Password1, 'fol']}



for key, value in data.items():
    cred(key, value[0], value[1])



Solution 1:[1]

You could use a config file. You could use a vault like system : https://www.vaultproject.io/ You can read the password from command line argument.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dharman