├── Procfile ├── wsgi.py ├── Flow Chart.png ├── project ├── db.sqlite ├── static │ ├── cat.png │ ├── dog.jpg │ ├── fox.jpg │ ├── lamb.jpg │ ├── pig.jpg │ ├── donkey.jpg │ ├── panda.jpg │ ├── rhino.jpg │ ├── tiger.jpg │ ├── ziraffe.jpg │ ├── images │ │ ├── 10.png │ │ ├── 11.png │ │ ├── 12.png │ │ ├── 13.png │ │ ├── 14.png │ │ ├── 15.png │ │ ├── 16.png │ │ ├── 17.png │ │ ├── 18.png │ │ ├── 19.png │ │ ├── 20.png │ │ ├── 21.png │ │ ├── 22.png │ │ ├── 23.png │ │ ├── 24.png │ │ ├── 25.png │ │ ├── 26.png │ │ ├── 27.png │ │ ├── 28.png │ │ ├── 29.png │ │ ├── 30.png │ │ ├── 31.png │ │ ├── 32.png │ │ ├── 33.png │ │ ├── 34.png │ │ ├── 35.png │ │ ├── 36.png │ │ ├── 37.png │ │ ├── 38.png │ │ ├── 39.png │ │ ├── 40.png │ │ ├── 41.png │ │ ├── 42.png │ │ ├── 43.png │ │ ├── 44.png │ │ ├── 45.png │ │ ├── 46.png │ │ └── 47.png │ └── kangaroo.jpg ├── models.py ├── main.py ├── templates │ ├── index.html │ ├── graphical_password_1.html │ ├── profile.html │ ├── base.html │ ├── graphical_password_2_signup.html │ ├── login.html │ ├── signup.html │ └── graphical_password_2_login.html ├── __init__.py └── auth.py ├── flask_project ├── db.sqlite ├── static │ ├── cat.png │ ├── dog.jpg │ ├── fox.jpg │ ├── pig.jpg │ ├── donkey.jpg │ ├── lamb.jpg │ ├── panda.jpg │ ├── rhino.jpg │ ├── tiger.jpg │ ├── kangaroo.jpg │ ├── ziraffe.jpg │ └── images │ │ ├── 10.png │ │ ├── 11.png │ │ ├── 12.png │ │ ├── 13.png │ │ ├── 14.png │ │ ├── 15.png │ │ ├── 16.png │ │ ├── 17.png │ │ ├── 18.png │ │ ├── 19.png │ │ ├── 20.png │ │ ├── 21.png │ │ ├── 22.png │ │ ├── 23.png │ │ ├── 24.png │ │ ├── 25.png │ │ ├── 26.png │ │ ├── 27.png │ │ ├── 28.png │ │ ├── 29.png │ │ ├── 30.png │ │ ├── 31.png │ │ ├── 32.png │ │ ├── 33.png │ │ ├── 34.png │ │ ├── 35.png │ │ ├── 36.png │ │ ├── 37.png │ │ ├── 38.png │ │ ├── 39.png │ │ ├── 40.png │ │ ├── 41.png │ │ ├── 42.png │ │ ├── 43.png │ │ ├── 44.png │ │ ├── 45.png │ │ ├── 46.png │ │ └── 47.png ├── models.py ├── main.py ├── templates │ ├── index.html │ ├── graphical_password_1.html │ ├── profile.html │ ├── base.html │ ├── graphical_password_2_signup.html │ ├── login.html │ ├── signup.html │ └── graphical_password_2_login.html ├── __init__.py └── auth.py ├── Project Documentation.docx ├── project presentation.pptx ├── requirements.txt ├── .github └── workflows │ └── master_graphic-password-demonstration.yml ├── LICENSE ├── .gitignore └── README.md /Procfile: -------------------------------------------------------------------------------- 1 | web: gunicorn wsgi:app -------------------------------------------------------------------------------- /wsgi.py: -------------------------------------------------------------------------------- 1 | from project import db, create_app 2 | app=create_app() 3 | #db.create_all(app=create_app()) 4 | -------------------------------------------------------------------------------- /Flow Chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/Flow Chart.png -------------------------------------------------------------------------------- /project/db.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/db.sqlite -------------------------------------------------------------------------------- /flask_project/db.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/db.sqlite -------------------------------------------------------------------------------- /project/static/cat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/cat.png -------------------------------------------------------------------------------- /project/static/dog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/dog.jpg -------------------------------------------------------------------------------- /project/static/fox.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/fox.jpg -------------------------------------------------------------------------------- /project/static/lamb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/lamb.jpg -------------------------------------------------------------------------------- /project/static/pig.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/pig.jpg -------------------------------------------------------------------------------- /Project Documentation.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/Project Documentation.docx -------------------------------------------------------------------------------- /project presentation.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project presentation.pptx -------------------------------------------------------------------------------- /project/static/donkey.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/donkey.jpg -------------------------------------------------------------------------------- /project/static/panda.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/panda.jpg -------------------------------------------------------------------------------- /project/static/rhino.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/rhino.jpg -------------------------------------------------------------------------------- /project/static/tiger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/tiger.jpg -------------------------------------------------------------------------------- /project/static/ziraffe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/ziraffe.jpg -------------------------------------------------------------------------------- /flask_project/static/cat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/cat.png -------------------------------------------------------------------------------- /flask_project/static/dog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/dog.jpg -------------------------------------------------------------------------------- /flask_project/static/fox.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/fox.jpg -------------------------------------------------------------------------------- /flask_project/static/pig.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/pig.jpg -------------------------------------------------------------------------------- /project/static/images/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/10.png -------------------------------------------------------------------------------- /project/static/images/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/11.png -------------------------------------------------------------------------------- /project/static/images/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/12.png -------------------------------------------------------------------------------- /project/static/images/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/13.png -------------------------------------------------------------------------------- /project/static/images/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/14.png -------------------------------------------------------------------------------- /project/static/images/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/15.png -------------------------------------------------------------------------------- /project/static/images/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/16.png -------------------------------------------------------------------------------- /project/static/images/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/17.png -------------------------------------------------------------------------------- /project/static/images/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/18.png -------------------------------------------------------------------------------- /project/static/images/19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/19.png -------------------------------------------------------------------------------- /project/static/images/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/20.png -------------------------------------------------------------------------------- /project/static/images/21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/21.png -------------------------------------------------------------------------------- /project/static/images/22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/22.png -------------------------------------------------------------------------------- /project/static/images/23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/23.png -------------------------------------------------------------------------------- /project/static/images/24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/24.png -------------------------------------------------------------------------------- /project/static/images/25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/25.png -------------------------------------------------------------------------------- /project/static/images/26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/26.png -------------------------------------------------------------------------------- /project/static/images/27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/27.png -------------------------------------------------------------------------------- /project/static/images/28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/28.png -------------------------------------------------------------------------------- /project/static/images/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/29.png -------------------------------------------------------------------------------- /project/static/images/30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/30.png -------------------------------------------------------------------------------- /project/static/images/31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/31.png -------------------------------------------------------------------------------- /project/static/images/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/32.png -------------------------------------------------------------------------------- /project/static/images/33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/33.png -------------------------------------------------------------------------------- /project/static/images/34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/34.png -------------------------------------------------------------------------------- /project/static/images/35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/35.png -------------------------------------------------------------------------------- /project/static/images/36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/36.png -------------------------------------------------------------------------------- /project/static/images/37.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/37.png -------------------------------------------------------------------------------- /project/static/images/38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/38.png -------------------------------------------------------------------------------- /project/static/images/39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/39.png -------------------------------------------------------------------------------- /project/static/images/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/40.png -------------------------------------------------------------------------------- /project/static/images/41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/41.png -------------------------------------------------------------------------------- /project/static/images/42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/42.png -------------------------------------------------------------------------------- /project/static/images/43.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/43.png -------------------------------------------------------------------------------- /project/static/images/44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/44.png -------------------------------------------------------------------------------- /project/static/images/45.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/45.png -------------------------------------------------------------------------------- /project/static/images/46.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/46.png -------------------------------------------------------------------------------- /project/static/images/47.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/images/47.png -------------------------------------------------------------------------------- /project/static/kangaroo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/project/static/kangaroo.jpg -------------------------------------------------------------------------------- /flask_project/static/donkey.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/donkey.jpg -------------------------------------------------------------------------------- /flask_project/static/lamb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/lamb.jpg -------------------------------------------------------------------------------- /flask_project/static/panda.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/panda.jpg -------------------------------------------------------------------------------- /flask_project/static/rhino.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/rhino.jpg -------------------------------------------------------------------------------- /flask_project/static/tiger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/tiger.jpg -------------------------------------------------------------------------------- /flask_project/static/kangaroo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/kangaroo.jpg -------------------------------------------------------------------------------- /flask_project/static/ziraffe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/ziraffe.jpg -------------------------------------------------------------------------------- /flask_project/static/images/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/10.png -------------------------------------------------------------------------------- /flask_project/static/images/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/11.png -------------------------------------------------------------------------------- /flask_project/static/images/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/12.png -------------------------------------------------------------------------------- /flask_project/static/images/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/13.png -------------------------------------------------------------------------------- /flask_project/static/images/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/14.png -------------------------------------------------------------------------------- /flask_project/static/images/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/15.png -------------------------------------------------------------------------------- /flask_project/static/images/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/16.png -------------------------------------------------------------------------------- /flask_project/static/images/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/17.png -------------------------------------------------------------------------------- /flask_project/static/images/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/18.png -------------------------------------------------------------------------------- /flask_project/static/images/19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/19.png -------------------------------------------------------------------------------- /flask_project/static/images/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/20.png -------------------------------------------------------------------------------- /flask_project/static/images/21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/21.png -------------------------------------------------------------------------------- /flask_project/static/images/22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/22.png -------------------------------------------------------------------------------- /flask_project/static/images/23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/23.png -------------------------------------------------------------------------------- /flask_project/static/images/24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/24.png -------------------------------------------------------------------------------- /flask_project/static/images/25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/25.png -------------------------------------------------------------------------------- /flask_project/static/images/26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/26.png -------------------------------------------------------------------------------- /flask_project/static/images/27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/27.png -------------------------------------------------------------------------------- /flask_project/static/images/28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/28.png -------------------------------------------------------------------------------- /flask_project/static/images/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/29.png -------------------------------------------------------------------------------- /flask_project/static/images/30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/30.png -------------------------------------------------------------------------------- /flask_project/static/images/31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/31.png -------------------------------------------------------------------------------- /flask_project/static/images/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/32.png -------------------------------------------------------------------------------- /flask_project/static/images/33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/33.png -------------------------------------------------------------------------------- /flask_project/static/images/34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/34.png -------------------------------------------------------------------------------- /flask_project/static/images/35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/35.png -------------------------------------------------------------------------------- /flask_project/static/images/36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/36.png -------------------------------------------------------------------------------- /flask_project/static/images/37.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/37.png -------------------------------------------------------------------------------- /flask_project/static/images/38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/38.png -------------------------------------------------------------------------------- /flask_project/static/images/39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/39.png -------------------------------------------------------------------------------- /flask_project/static/images/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/40.png -------------------------------------------------------------------------------- /flask_project/static/images/41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/41.png -------------------------------------------------------------------------------- /flask_project/static/images/42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/42.png -------------------------------------------------------------------------------- /flask_project/static/images/43.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/43.png -------------------------------------------------------------------------------- /flask_project/static/images/44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/44.png -------------------------------------------------------------------------------- /flask_project/static/images/45.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/45.png -------------------------------------------------------------------------------- /flask_project/static/images/46.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/46.png -------------------------------------------------------------------------------- /flask_project/static/images/47.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theshanmuk/Graphical-Password-to-Avoid-Shoulder-Surfing/HEAD/flask_project/static/images/47.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | gunicorn==20.0.4 2 | psycopg2==2.8.5 3 | alembic==1.4.2 4 | flask==1.1.2 5 | flask-sqlalchemy==2.4.4 6 | flask-login==0.5.0 7 | werkzeug==1.0.1 8 | 9 | 10 | -------------------------------------------------------------------------------- /project/models.py: -------------------------------------------------------------------------------- 1 | from flask_login import UserMixin 2 | from . import db 3 | 4 | class User(UserMixin, db.Model): 5 | id = db.Column(db.Integer, primary_key=True) # primary keys are required by SQLAlchemy 6 | email = db.Column(db.String(100), unique=True) 7 | password = db.Column(db.String(100)) 8 | name = db.Column(db.String(1000)) -------------------------------------------------------------------------------- /flask_project/models.py: -------------------------------------------------------------------------------- 1 | from flask_login import UserMixin 2 | from . import db 3 | 4 | class User(UserMixin, db.Model): 5 | id = db.Column(db.Integer, primary_key=True) # primary keys are required by SQLAlchemy 6 | email = db.Column(db.String(100), unique=True) 7 | password = db.Column(db.String(100)) 8 | name = db.Column(db.String(1000)) -------------------------------------------------------------------------------- /project/main.py: -------------------------------------------------------------------------------- 1 | from flask import Blueprint, render_template, abort 2 | from flask_login import login_required, current_user 3 | 4 | main = Blueprint('main', __name__) 5 | 6 | @main.route('/') 7 | def index(): 8 | return render_template('index.html') 9 | 10 | @main.route('/profile') 11 | @login_required 12 | def profile(): 13 | return render_template('profile.html', name=current_user.name, 14 | username= current_user.name, 15 | password= current_user.password, 16 | email= current_user.email) 17 | -------------------------------------------------------------------------------- /flask_project/main.py: -------------------------------------------------------------------------------- 1 | from flask import Blueprint, render_template, abort 2 | from flask_login import login_required, current_user 3 | 4 | main = Blueprint('main', __name__) 5 | 6 | @main.route('/') 7 | def index(): 8 | return render_template('index.html') 9 | 10 | @main.route('/profile') 11 | @login_required 12 | def profile(): 13 | return render_template('profile.html', name=current_user.name, 14 | username= current_user.name, 15 | password= current_user.password, 16 | email= current_user.email) 17 | -------------------------------------------------------------------------------- /project/templates/index.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | 5 |

6 | Graphical Password to Avoid Shoulder Surfing

(CSIT-24) 7 |


8 |

9 | by

10 | Shanmuk Pandranki

11 | K.V.S.P. Akhilesh

12 | Jahnavi
13 |




14 |

15 | Cyber Security Internship 16 |

17 | 18 | 25 | {% endblock %} 26 | -------------------------------------------------------------------------------- /flask_project/templates/index.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | 5 |

6 | Graphical Password to Avoid Should Surfing

(CSIT-24) 7 |


8 |

9 | by

10 | Shanmuk Pandranki

11 | K.V.S.P. Akhilesh

12 | Jahnavi
13 |




14 |

15 | Cyber Security Internship 16 |

17 | 18 | 25 | {% endblock %} 26 | -------------------------------------------------------------------------------- /.github/workflows/master_graphic-password-demonstration.yml: -------------------------------------------------------------------------------- 1 | # Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy 2 | # More GitHub Actions for Azure: https://github.com/Azure/actions 3 | 4 | name: Build and deploy Python app to Azure Web App - graphic-password-demonstration 5 | 6 | on: 7 | push: 8 | branches: 9 | - master 10 | 11 | jobs: 12 | build-and-deploy: 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@master 17 | 18 | - name: Set up Python version 19 | uses: actions/setup-python@v1 20 | with: 21 | python-version: '3.8' 22 | 23 | - name: Build using AppService-Build 24 | uses: azure/appservice-build@v1 25 | with: 26 | platform: python 27 | platform-version: '3.8' 28 | 29 | - name: 'Deploy to Azure Web App' 30 | uses: azure/webapps-deploy@v2 31 | with: 32 | app-name: 'graphic-password-demonstration' 33 | slot-name: 'production' 34 | publish-profile: ${{ secrets.AzureAppService_PublishProfile_dd636e2be5d5448d8f6a7ad7eaabfd73 }} -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 mr_shanmuk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /flask_project/__init__.py: -------------------------------------------------------------------------------- 1 | from flask import Flask 2 | from flask_sqlalchemy import SQLAlchemy 3 | from flask_login import LoginManager 4 | 5 | # init SQLAlchemy so we can use it later in our models 6 | db = SQLAlchemy() 7 | 8 | def create_app(): 9 | app = Flask(__name__) 10 | 11 | app.config['SECRET_KEY'] = 'cybersecurity' 12 | app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///db.sqlite' 13 | app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False 14 | 15 | 16 | db.init_app(app) 17 | 18 | login_manager = LoginManager() 19 | login_manager.login_view = 'auth.login' 20 | login_manager.init_app(app) 21 | 22 | from .models import User 23 | 24 | @login_manager.user_loader 25 | def load_user(user_id): 26 | # since the user_id is just the primary key of our user table, use it in the query for the user 27 | return User.query.get(int(user_id)) 28 | 29 | # blueprint for auth routes in app 30 | from .auth import auth as auth_blueprint 31 | app.register_blueprint(auth_blueprint) 32 | 33 | # blueprint for non-auth parts of app 34 | from .main import main as main_blueprint 35 | app.register_blueprint(main_blueprint) 36 | 37 | return app 38 | -------------------------------------------------------------------------------- /project/__init__.py: -------------------------------------------------------------------------------- 1 | from flask import Flask 2 | from flask_sqlalchemy import SQLAlchemy 3 | from flask_login import LoginManager 4 | import os 5 | 6 | # init SQLAlchemy so we can use it later in our models 7 | db = SQLAlchemy() 8 | 9 | def create_app(): 10 | app = Flask(__name__) 11 | 12 | app.config['SECRET_KEY'] = os.environ.get('SECRET_KEY') 13 | app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URL') 14 | app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False 15 | 16 | db.init_app(app) 17 | 18 | login_manager = LoginManager() 19 | login_manager.login_view = 'auth.login' 20 | login_manager.init_app(app) 21 | 22 | from .models import User 23 | 24 | @login_manager.user_loader 25 | def load_user(user_id): 26 | # since the user_id is just the primary key of our user table, use it in the query for the user 27 | return User.query.get(int(user_id)) 28 | 29 | # blueprint for auth routes in app 30 | from .auth import auth as auth_blueprint 31 | app.register_blueprint(auth_blueprint) 32 | 33 | # blueprint for non-auth parts of app 34 | from .main import main as main_blueprint 35 | app.register_blueprint(main_blueprint) 36 | 37 | return app 38 | -------------------------------------------------------------------------------- /project/templates/graphical_password_1.html: -------------------------------------------------------------------------------- 1 | {% for row in images %} 2 |
3 | {% for password in row %} 4 |
5 | 9 |
10 | {% endfor %} 11 | 12 |
13 | {% endfor %} 14 | -------------------------------------------------------------------------------- /flask_project/templates/graphical_password_1.html: -------------------------------------------------------------------------------- 1 | {% for row in images %} 2 |
3 | {% for password in row %} 4 |
5 | 9 |
10 | {% endfor %} 11 | 12 |
13 | {% endfor %} 14 | -------------------------------------------------------------------------------- /project/templates/profile.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |

Welcome, {{ name }}!




5 |
6 |
A C C O U N T - D E T A I L S

7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
Username:{{ username }}
Password: {{ password }}
Email ID:{{ email }}
21 |
22 | 23 | 41 | 42 | {% endblock %} 43 | -------------------------------------------------------------------------------- /flask_project/templates/profile.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |

Welcome, {{ name }}!




5 |
6 |
A C C O U N T - D E T A I L S

7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
Username:{{ username }}
Password: {{ password }}
Email ID:{{ email }}
21 |
22 | 23 | 41 | 42 | {% endblock %} 43 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | env/ 108 | venv/ 109 | ENV/ 110 | env.bak/ 111 | venv.bak/ 112 | 113 | # Spyder project settings 114 | .spyderproject 115 | .spyproject 116 | 117 | # Rope project settings 118 | .ropeproject 119 | 120 | # mkdocs documentation 121 | /site 122 | 123 | # mypy 124 | .mypy_cache/ 125 | .dmypy.json 126 | dmypy.json 127 | 128 | # Pyre type checker 129 | .pyre/ 130 | -------------------------------------------------------------------------------- /project/templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Graphical Password Authentication 8 | 9 | 10 | 11 | 12 | 13 | 18 |
19 | 20 |
21 |
53 | 54 | 55 |
56 |
57 | {% block content %} 58 | {% endblock %} 59 |
60 |
61 |
62 | 63 | 64 | -------------------------------------------------------------------------------- /flask_project/templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Graphical Password Authentication 8 | 9 | 10 | 11 | 12 | 13 | 19 |
20 |
21 | 55 |
56 |
57 |
58 | {% block content %} 59 | {% endblock %} 60 |
61 |
62 |
63 | 64 | 65 | -------------------------------------------------------------------------------- /project/templates/graphical_password_2_signup.html: -------------------------------------------------------------------------------- 1 |
2 | 6 | 10 | 14 | 18 | 19 | 20 | 24 |
25 | 26 |
27 | 28 | 32 | 36 | 40 | 44 | 48 |
49 | 50 | -------------------------------------------------------------------------------- /flask_project/templates/graphical_password_2_signup.html: -------------------------------------------------------------------------------- 1 |
2 | 6 | 10 | 14 | 18 | 19 | 20 | 24 |
25 | 26 |
27 | 28 | 32 | 36 | 40 | 44 | 48 |
49 | 50 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=shanmukmichael_Graphical-Password-to-Avoid-Shoulder-Surfing&metric=alert_status)](https://sonarcloud.io/dashboard?id=shanmukmichael_Graphical-Password-to-Avoid-Shoulder-Surfing) 2 | [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=shanmukmichael_Graphical-Password-to-Avoid-Shoulder-Surfing&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=shanmukmichael_Graphical-Password-to-Avoid-Shoulder-Surfing) 3 | [![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=shanmukmichael_Graphical-Password-to-Avoid-Shoulder-Surfing&metric=ncloc)](https://sonarcloud.io/dashboard?id=shanmukmichael_Graphical-Password-to-Avoid-Shoulder-Surfing) 4 | [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=shanmukmichael_Graphical-Password-to-Avoid-Shoulder-Surfing&metric=security_rating)](https://sonarcloud.io/dashboard?id=shanmukmichael_Graphical-Password-to-Avoid-Shoulder-Surfing) 5 | [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=shanmukmichael_Graphical-Password-to-Avoid-Shoulder-Surfing&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=shanmukmichael_Graphical-Password-to-Avoid-Shoulder-Surfing) 6 | 7 | 8 | 9 | 10 | # Graphical-Password-to-Avoid-Shoulder-Surfing 11 | * We the team developed two method Graphical Password Authentication System || Cyber Security Internship || 12 | * Signup & Login Authentication Using Flask 13 | * Password Hashing - SHA256 14 | 15 | # :writing_hand: Requirements 16 | - flask 17 | - flask-sqlalchemy 18 | - flask-login 19 | - werkzeug 20 | # Extra Requirements for Heroku App 21 | - gunicorn 22 | - psycopg2 23 | - alembic 24 | 25 | > ## :heavy_check_mark:Windows 26 | * ```pip install -r requirements.txt``` to install dependencies 27 | * ```python3 -m venv ``` to create virtual environment 28 | * ```\scripts\activate``` 29 | * ```SET FLASK_APP=flask_project``` here app is "flask_project" folder 30 | * ```SET FLASK_DEBUG=1``` 31 | * ```flask run``` 32 | 33 | > ## :heavy_check_mark:Linux 34 | * ```pip install -r requirements.txt``` to install dependencies 35 | * ```python3 -m venv ``` to create virtual environment 36 | * ```source \scripts\activate``` 37 | * ```export FLASK_APP=flask_project``` here app is "flask_project" folder 38 | * ```export FLASK_DEBUG=1``` 39 | * ```flask run``` 40 | 41 | 42 | > ## :heavy_check_mark:Heroku App 43 |

44 | Go To Website 45 | 46 |

47 | 48 | # Flow Chart 49 |

50 | 51 |

52 | 53 | 54 |

55 | 56 | 57 | 58 | 59 | 60 |

61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /project/auth.py: -------------------------------------------------------------------------------- 1 | from flask import Blueprint, render_template, redirect, url_for, request, flash 2 | from werkzeug.security import generate_password_hash, check_password_hash 3 | from flask_login import login_user, logout_user, login_required 4 | from .models import User 5 | from . import db 6 | import random 7 | 8 | auth = Blueprint('auth', __name__) 9 | 10 | @auth.route('/signup') 11 | def signup(): 12 | #Grahical---Password---Logic to confuse hacker 13 | N = 6 14 | images_ = random.sample(range(10, 46), N * N) 15 | images = [] 16 | for i in range(0, N * N, N): 17 | images.append(images_[i:i + N]) 18 | return render_template('signup.html',images=images) 19 | 20 | @auth.route('/login') 21 | def login(): 22 | #Grahical---Password---Logic to confuse hacker 23 | N = 6 24 | images_ = random.sample(range(10, 46), N * N) 25 | images = [] 26 | for i in range(0, N * N, N): 27 | images.append(images_[i:i + N]) 28 | return render_template('login.html',images=images) 29 | 30 | @auth.route('/signup', methods=['POST']) 31 | def signup_post(): 32 | email = request.form.get('email') 33 | name = request.form.get('name') 34 | if(request.form.get('row') and request.form.get('column')): 35 | row = request.form.get('row') 36 | col = request.form.get('column') 37 | password = row+col 38 | print(password, ".....") 39 | else: 40 | password_1 = sorted(request.form.getlist('password')) 41 | password_1 = ''.join(map(str, password_1)) 42 | if len(password_1) < 8: 43 | flash("password must be minimum 4 selections") 44 | return redirect(url_for('auth.signup')) 45 | else: 46 | password = password_1 47 | 48 | # if this returns a user, then the email already exists in database 49 | user = User.query.filter_by(email=email).first() 50 | 51 | if user: # if a user is found, we want to redirect back to signup page so user can try again 52 | flash('Email address already exists') 53 | return redirect(url_for('auth.signup')) 54 | 55 | # create a new user with the form data. Hash the password so the plaintext version isn't saved. 56 | new_user = User(email=email, name=name, password=generate_password_hash(password, method='sha256')) 57 | 58 | # add the new user to the database 59 | db.session.add(new_user) 60 | db.session.commit() 61 | return redirect(url_for('auth.login')) 62 | 63 | @auth.route('/login', methods=['POST']) 64 | def login_post(): 65 | email = request.form.get('email') 66 | if(request.form.get('row-column')): 67 | password = request.form.get('row-column') 68 | print(password,".....") 69 | 70 | else: 71 | password_1= sorted(request.form.getlist('password')) 72 | password_1 =''.join(map(str, password_1)) 73 | if len(password_1) < 8: 74 | flash("password must be minimum 4 selections") 75 | return redirect(url_for('auth.signup')) 76 | else: 77 | password = password_1 78 | 79 | 80 | remember = True if request.form.get('remember') else False 81 | user = User.query.filter_by(email=email).first() 82 | 83 | # check if the user actually exists 84 | # take the user-supplied password, hash it, and compare it to the hashed password in the database 85 | if not user or not check_password_hash(user.password, password): 86 | flash('Please check your login details and try again.') 87 | return redirect(url_for('auth.login')) # if the user doesn't exist or password is wrong, reload the page 88 | 89 | # if the above check passes, then we know the user has the right credentials 90 | login_user(user, remember=remember) 91 | return redirect(url_for('main.profile')) 92 | 93 | @auth.route('/logout') 94 | @login_required 95 | def logout(): 96 | logout_user() 97 | return redirect(url_for('main.index')) 98 | 99 | -------------------------------------------------------------------------------- /flask_project/auth.py: -------------------------------------------------------------------------------- 1 | from flask import Blueprint, render_template, redirect, url_for, request, flash 2 | from werkzeug.security import generate_password_hash, check_password_hash 3 | from flask_login import login_user, logout_user, login_required 4 | from .models import User 5 | from . import db 6 | import random 7 | 8 | auth = Blueprint('auth', __name__) 9 | 10 | @auth.route('/signup') 11 | def signup(): 12 | #Grahical---Password---Logic to confuse hacker 13 | N = 6 14 | images_ = random.sample(range(10, 46), N * N) 15 | images = [] 16 | for i in range(0, N * N, N): 17 | images.append(images_[i:i + N]) 18 | return render_template('signup.html',images=images) 19 | 20 | @auth.route('/login') 21 | def login(): 22 | #Grahical---Password---Logic to confuse hacker 23 | N = 6 24 | images_ = random.sample(range(10, 46), N * N) 25 | images = [] 26 | for i in range(0, N * N, N): 27 | images.append(images_[i:i + N]) 28 | return render_template('login.html',images=images) 29 | 30 | @auth.route('/signup', methods=['POST']) 31 | def signup_post(): 32 | email = request.form.get('email') 33 | name = request.form.get('name') 34 | if(request.form.get('row') and request.form.get('column')): 35 | row = request.form.get('row') 36 | col = request.form.get('column') 37 | password = row+col 38 | print(password, ".....") 39 | else: 40 | password_1 = sorted(request.form.getlist('password')) 41 | password_1 = ''.join(map(str, password_1)) 42 | if len(password_1) < 8: 43 | flash("password must be minimum 4 selections") 44 | return redirect(url_for('auth.signup')) 45 | else: 46 | password = password_1 47 | 48 | # if this returns a user, then the email already exists in database 49 | user = User.query.filter_by(email=email).first() 50 | 51 | if user: # if a user is found, we want to redirect back to signup page so user can try again 52 | flash('Email address already exists') 53 | return redirect(url_for('auth.signup')) 54 | 55 | # create a new user with the form data. Hash the password so the plaintext version isn't saved. 56 | new_user = User(email=email, name=name, password=generate_password_hash(password, method='sha256')) 57 | 58 | # add the new user to the database 59 | db.session.add(new_user) 60 | db.session.commit() 61 | return redirect(url_for('auth.login')) 62 | 63 | @auth.route('/login', methods=['POST']) 64 | def login_post(): 65 | email = request.form.get('email') 66 | if(request.form.get('row-column')): 67 | password = request.form.get('row-column') 68 | print(password,".....") 69 | 70 | else: 71 | password_1= sorted(request.form.getlist('password')) 72 | password_1 =''.join(map(str, password_1)) 73 | if len(password_1) < 8: 74 | flash("password must be minimum 4 selections") 75 | return redirect(url_for('auth.signup')) 76 | else: 77 | password = password_1 78 | 79 | 80 | remember = True if request.form.get('remember') else False 81 | user = User.query.filter_by(email=email).first() 82 | 83 | # check if the user actually exists 84 | # take the user-supplied password, hash it, and compare it to the hashed password in the database 85 | if not user or not check_password_hash(user.password, password): 86 | flash('Please check your login details and try again.') 87 | return redirect(url_for('auth.login')) # if the user doesn't exist or password is wrong, reload the page 88 | 89 | # if the above check passes, then we know the user has the right credentials 90 | login_user(user, remember=remember) 91 | return redirect(url_for('main.profile')) 92 | 93 | @auth.route('/logout') 94 | @login_required 95 | def logout(): 96 | logout_user() 97 | return redirect(url_for('main.index')) 98 | 99 | -------------------------------------------------------------------------------- /project/templates/login.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | {% with messages = get_flashed_messages() %} 5 | {% if messages %} 6 |
7 | {{ messages[0] }} 8 |
9 | {% endif %} 10 | {% endwith %} 11 | 12 | 14 | 24 | 43 |
44 |
45 | PICK
YOUR

PASSWORD

TYPE
FOR

LOGIN

46 |
47 |
48 | 49 |




50 | 51 |
52 | 53 | 58 |
59 | 60 | 88 | 89 | 90 | 118 |
119 | 120 | {% endblock %} 121 | 122 | -------------------------------------------------------------------------------- /flask_project/templates/login.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | {% with messages = get_flashed_messages() %} 5 | {% if messages %} 6 |
7 | {{ messages[0] }} 8 |
9 | {% endif %} 10 | {% endwith %} 11 | 12 | 14 | 24 | 43 |
44 |
45 | PICK
YOUR

PASSWORD

TYPE
FOR

LOGIN

46 |
47 |
48 | 49 |




50 | 51 |
52 | 53 | 58 |
59 | 60 | 88 | 89 | 90 | 118 |
119 | 120 | {% endblock %} 121 | 122 | -------------------------------------------------------------------------------- /project/templates/signup.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | {% with messages = get_flashed_messages() %} 5 | {% if messages %} 6 |
7 | {{ messages[0] }}. Go to login page. 8 |
9 | {% endif %} 10 | {% endwith %} 11 | 21 |
22 | PICK
YOUR

PASSWORD

TYPE
FOR

SIGNUP

23 |
24 |
25 | 26 |




27 | 28 |
29 | 30 | 35 |
36 | 37 | 66 | 67 | 68 | 69 | 97 | 98 | 99 | 100 | 101 | 120 | 121 | 122 | {% endblock %} 123 | 124 | 125 | -------------------------------------------------------------------------------- /flask_project/templates/signup.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | {% with messages = get_flashed_messages() %} 5 | {% if messages %} 6 |
7 | {{ messages[0] }}. Go to login page. 8 |
9 | {% endif %} 10 | {% endwith %} 11 | 21 |
22 | PICK
YOUR

PASSWORD

TYPE
FOR

SIGNUP

23 |
24 |
25 | 26 |




27 | 28 |
29 | 30 | 35 |
36 | 37 | 66 | 67 | 68 | 69 | 97 | 98 | 99 | 100 | 101 | 120 | 121 | 122 | {% endblock %} 123 | 124 | 125 | -------------------------------------------------------------------------------- /flask_project/templates/graphical_password_2_login.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | 29 |
30 | 31 | 32 | 33 | 37 | 41 | 45 | 49 | 53 | 57 | 58 |
59 | 60 | 61 | 65 | 69 | 73 | 77 | 81 | 85 | 86 |
87 | 88 | 89 | 93 | 97 | 101 | 105 | 109 | 113 | 114 |
115 | 116 | 117 | 121 | 125 | 129 | 133 | 137 | 141 | 142 |
143 | 144 | 145 | 149 | 153 | 157 | 161 | 165 | 169 | 170 |
171 | 172 | 173 | 174 | 175 |
176 | 177 | 178 | 179 | -------------------------------------------------------------------------------- /project/templates/graphical_password_2_login.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | 29 |
30 | 31 | 32 | 33 | 37 | 41 | 45 | 49 | 53 | 57 | 58 |
59 | 60 | 61 | 65 | 69 | 73 | 77 | 81 | 85 | 86 |
87 | 88 | 89 | 93 | 97 | 101 | 105 | 109 | 113 | 114 |
115 | 116 | 117 | 121 | 125 | 129 | 133 | 137 | 141 | 142 |
143 | 144 | 145 | 149 | 153 | 157 | 161 | 165 | 169 | 170 |
171 | 172 | 173 | 174 | 175 |
176 | 177 | 178 | 179 | 206 | --------------------------------------------------------------------------------