Skip to content

Commit

Permalink
#4 provide username from command line
Browse files Browse the repository at this point in the history
  • Loading branch information
Huitzilo committed Feb 15, 2022
1 parent 82fa540 commit 9686a8e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion connect_UHVPN.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,17 @@
import time
import os
import subprocess
import argparse

username = input("UH username: ")
parser = argparse.ArgumentParser(description='Connect to the UH VPN from the command line,' +\
' obtaining the authentification cookie through a browser' +\
' that is controlled through Selenium.')
parser.add_argument('-u','--username', help="UH username ([email protected])")
args = parser.parse_args()

username = args.username
if not username:
username = input("UH username: ")
pw = getpass('UH password: ')
service = Service(executable_path=ChromeDriverManager().install())
options = Options()
Expand Down

1 comment on commit 9686a8e

@Huitzilo
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

implements solution to #4

Please sign in to comment.