Commit eb57e7fe authored by Minkush Jain's avatar Minkush Jain

add feature to check password mismatch

parent f4035375
#!/usr/bin/python
# -*- coding: utf-8 -*-
# using requests and BeautifulSoup to automate salsa account registration
# using Requests and Beautiful Soup to automate salsa account registration
import requests
from bs4 import BeautifulSoup
......@@ -46,18 +46,33 @@ def register_account(
, cookies=parse_link.cookies, data=data)
if __name__ == '__main__':
print('Welcome to GSoC 2018')
print('Project: Wizard/GUI Helping Students get Started\n')
print('This is a program to automate the process of \new account creation on Salsa using HTTP Post.\n')
print('This is a program to automate the process of new account creation on Salsa using HTTP Post.\n')
username = input('Enter you username: ')
full_name = input('Enter you name: ')
email_address = input('Enter you email: ')
user_password = getpass.getpass()
confirm_password = getpass.getpass(prompt='Confirm password: ')
# Input password:
while True:
try:
user_password = getpass.getpass()
except Exception as err:
print('ERROR:', err)
try:
confirm_password = getpass.getpass(prompt='Confirm password: ')
except Exception as err:
print('ERROR:', err)
# Checking for password mismatch
if user_password == confirm_password:
break
else:
print("Passwords don't match. Enter again\n")
register_account(username, full_name, email_address, user_password)
print("Congrats! Your new Salsa account has been created. Check your mail for further instructions")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment