mirror of
https://github.com/Rushilwiz/SkoolOS.git
synced 2025-04-16 02:10:19 -04:00
Merge branch 'development' of github.com:Rushilwiz/SkoolOS into development
This commit is contained in:
commit
1ba3d791f3
1
.profile
Normal file
1
.profile
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{'absences': 2, 'address': None, 'counselor': {'first_name': 'Sean', 'full_name': 'Sean Burke', 'id': 37, 'last_name': 'Burke', 'url': 'https://ion.tjhsst.edu/api/profile/37', 'user_type': 'counselor', 'username': 'SPBurke'}, 'display_name': 'Raffu Khondaker', 'emails': [], 'first_name': 'Raffu', 'full_name': 'Raffu Khondaker', 'grade': {'name': 'sophomore', 'number': 10}, 'graduation_year': 2022, 'id': 36508, 'ion_username': '2022rkhondak', 'is_announcements_admin': False, 'is_eighth_admin': False, 'is_student': True, 'is_teacher': False, 'last_name': 'Khondaker', 'middle_name': 'Al', 'nickname': '', 'phones': [], 'picture': 'https://ion.tjhsst.edu/api/profile/36508/picture', 'sex': 'Male', 'short_name': 'Raffu', 'title': None, 'tj_email': '2022rkhondak@tjhsst.edu', 'user_type': 'student', 'websites': []}
|
|
@ -14,8 +14,8 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="d-flex align-items-center justify-content-center" style="height: 100vh">
|
<div class="d-flex align-items-center justify-content-center" style="height: 100vh">
|
||||||
|
<a href="https://ion.tjhsst.edu/oauth/authorize/?response_type=code&client_id=QeZPBSKqdvWFfBv1VYTSv9iFGz5T9pVJtNUjbEr6&redirect_uri=http%3A%2F%2Flocalhost%3A8000%2F&scope=read&state=O9QWIinWimSA8Kehr8vxUZHZ0SNPpL" title="Ion" class="border border-dark p-3 btn btn-lg mx-auto" style="box-shadow: 5px 10px;">
|
||||||
<img src="https://ion.tjhsst.edu/static/img/favicon.png">
|
<img src="https://ion.tjhsst.edu/static/img/favicon.png">
|
||||||
Sign in with Ion
|
Sign in with Ion
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -14,6 +14,7 @@ from PyInquirer import prompt, print_json
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import argparse
|
import argparse
|
||||||
|
from cryptography.fernet import Fernet
|
||||||
|
|
||||||
client_id = r'QeZPBSKqdvWFfBv1VYTSv9iFGz5T9pVJtNUjbEr6'
|
client_id = r'QeZPBSKqdvWFfBv1VYTSv9iFGz5T9pVJtNUjbEr6'
|
||||||
client_secret = r'0Wl3hAIGY9SvYOqTOLUiLNYa4OlCgZYdno9ZbcgCT7RGQ8x2f1l2HzZHsQ7ijC74A0mrOhhCVeZugqAmOADHIv5fHxaa7GqFNtQr11HX9ySTw3DscKsphCVi5P71mlGY'
|
client_secret = r'0Wl3hAIGY9SvYOqTOLUiLNYa4OlCgZYdno9ZbcgCT7RGQ8x2f1l2HzZHsQ7ijC74A0mrOhhCVeZugqAmOADHIv5fHxaa7GqFNtQr11HX9ySTw3DscKsphCVi5P71mlGY'
|
||||||
|
@ -69,6 +70,11 @@ def authenticate():
|
||||||
|
|
||||||
browser.get("localhost:8000/")
|
browser.get("localhost:8000/")
|
||||||
|
|
||||||
|
while "http://localhost:8000/callback/?code" not in browser.current_url:
|
||||||
|
time.sleep(0.25)
|
||||||
|
|
||||||
|
url = browser.current_url
|
||||||
|
gets = url_decode(url.replace("http://localhost:8000/callback/?", ""))
|
||||||
while "http://localhost:8000/callback/?code" not in browser.current_url:
|
while "http://localhost:8000/callback/?code" not in browser.current_url:
|
||||||
time.sleep(0.25)
|
time.sleep(0.25)
|
||||||
|
|
||||||
|
@ -101,6 +107,10 @@ def authenticate():
|
||||||
os.chdir(cdir)
|
os.chdir(cdir)
|
||||||
profileFile = open(".profile", "w")
|
profileFile = open(".profile", "w")
|
||||||
#profileFile.write(profile.text())
|
#profileFile.write(profile.text())
|
||||||
|
key = Fernet.generate_key()
|
||||||
|
file = open('key.key', 'wb')
|
||||||
|
file.write(key) # The key is type bytes still
|
||||||
|
file.close()
|
||||||
profileFile.write(str(profile))
|
profileFile.write(str(profile))
|
||||||
profileFile.close()
|
profileFile.close()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user