-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
30 lines (23 loc) · 904 Bytes
/
setup.py
File metadata and controls
30 lines (23 loc) · 904 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import pyotp
import getpass
import shutil
import os
from config import useTOTP
print('Welcome to LionPath Sniper Setup!')
print('PSU Email: ', end='')
username = input()
password = getpass.getpass('PSU Password: ', stream=None)
if useTOTP:
print('TOTP 2FA Setup (disable useTOTP in config.py to skip)')
totpsecret = getpass.getpass('TOTP Secret: ', stream=None)
# Write the username and password parameters to logininfo.py
with open("logininfo.py", "w") as file:
# Write the variable assignments to the file
file.write(f"username = '{username}'\n")
file.write(f"password = '{password}'\n")
if useTOTP:
file.write(f"totpsecret = " + f"'{totpsecret}'\n")
# not implemented yet
# print('Which semester to enroll in (which radio button to click starting from 1): ', end='')
# radnum = input()
print("Setup Complete! Run 'python3 main.py' to start the LionPath Sniper.")