This repo is private, after the submission and checking for the OneBanc-Assignment, this repo will be public. -> Thanks to visit : Author(TUSHAR SINGH)
The project aims to address the security vulnerability of guessable MPINs used for mobile banking access. Users often set weak MPINs that are either common patterns (e.g., 1122) or derived from easily obtainable personal details like date of birth or anniversaries.
The core task is to develop a program that evaluates the strength of an MPIN (initially 4-digit, then extended to 6-digit).
- Identify if a 4-digit MPIN is commonly used.
- Assess MPIN strength ("WEAK" or "STRONG") considering user demographics (DOB, spouse's DOB, anniversary).
- If the MPIN is "WEAK", provide specific reasons (e.g., COMMONLY_USED, DEMOGRAPHIC_DOB_SELF).
- Extend the functionality to support 6-digit MPINs.
- Include comprehensive testing with at least 20 test cases.
Run this command in your VSCode cmd terminal : python mpinValidator.py
# Project structure:
# MPIN-VALIDATOR/
# ├── common/
# │ ├── __init__.py
# │ ├── constants.py # Common constants used across the project
# │ └── utils.py # Utility functions
# ├── validators/
# │ ├── __init__.py
# │ ├── common_mpin.py # Common MPIN validator
# │ └── demographic.py # Demographic based validation
# ├── models/
# │ ├── __init__.py
# │ ├── user.py # User model with demographic information
# │ └── result.py # Result model for validation output
# ├── main.py # Contains the MPIN-Validation class
# ├── mpinValidator.py # Main entry point: Run this file for checking/validating the strength of MPIN
# └── tests/
# ├── __init__.py
# └── test_mpin.py # Test cases
Ensure you have the following dependencies installed:
- Python (version 3.12.x)
- IDE: VS-CODE or collab
- Virtual-environment(venv)
- Other dependencies (refer to the requirement.txt)
- This project is purely on Python and some Python packages
You can install the required Python packages using:
pip install -r requirement.txt
- Clone the repository:
git clone https://github.com/SINGHxTUSHAR/mpin-validator.git
cd NextWordAI
- Create a virtual environment (optional but recommended):
python -m venv venv
- Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS/Linux:
source venv/bin/activate
If you'd like to contribute to this project, please follow the standard GitHub fork and pull request process. Contributions, issues, and feature requests are welcome!
If you have any suggestions for me related to this project, feel free to contact me at tusharsinghrawat.delhi@gmail.com or LinkedIn.
This project is licensed under the MIT License - see the LICENSE file for details.