
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
advanced-password-validator
Advanced tools
A dynamic password validation system with preconfigured modes and rule-based design
A dynamic, rule-based password validation system for Python. Supports configurable validation rules and pre-set security modes to suit different application needs.
lenient
, moderate
, strict
pip install advanced_password_validator
poetry add advanced_password_validator
An overview of a common coding example utilizing the advanced_password_validator to validate a password using customizable rules
from advanced_password_validator import PasswordValidator, Mode
# Instantiate a validator object:
validator = PasswordValidator(
min_length = 8, # Integer / Defaults to None
max_length = 65, # Integer / Defaults to None
require_uppercase = True, # Boolean / Defaults to False
require_numbers = True, # Boolean / Defaults to False
require_symbols = True, # Boolean / Defaults to False
no_spaces = True, # Boolean / Defaults to False
must_include_char = None, # String / Defaults to None
no_repeating_chars = 5, # Integer / Defaults to None
blacklisted_pattern = False, # Boolean / Defaults to False
not_common = False, # Boolean / Defaults to False
mode = None # Mode (Enum) / Defaults to None
)
# validate against password strings:
password_valid1 = validator.validate("ThisIsSuperValid123+")[0]
password_valid2 = validator.validate("nouppercase123+")[0]
password_valid3 = validator.validate("NoNumbers++")[0]
print(password_valid1) # <= Returns True
print(password_valid2) # <= Returns False
print(password_valid3) # <= Returns False
The validate method returns a tuple: (bool, list)
A rudimentary overview of the rules that can enabled for custom validation
Rules | Description |
---|---|
min_length | Specifies the minimum length required for the password (Integer) |
max_length | Specifies the maximum length possible for the password (Integer) |
require_uppercase | Specifies if the password must include at least 1 uppercase letter (Boolean) |
require_numbers | Specifies if the password must include at least 1 digit (Boolean) |
require_symbols | Specifies if the password must include at least 1 special character (Boolean) |
no_spaces | Specifies if the password can include spaces (Boolean) |
must_include_char | Specifies one of more required characters in the password (String) |
no_repeating_chars | Specifies how many sequentially, repeating characters can be included in the password (Integer) |
blacklisted_pattern | Specifies whether to check the password against a list of blacklisted patterns (Boolean) |
not_common | Specifies whether to check the password against a list of commonly used passwords (Boolean) |
mode | Specifies whether to use one of the 3 preconfigured modes (Mode) |
The advanced password validator package supports 3 preconfigured validator modes:
from advanced_password_validator import PasswordValidator, Mode
validator = PasswordValidator(
mode=Mode.lenient
)
# The mode param takes in a Mode-object (Enum) - Mode.lenient, Mode.moderate, Mode.strict
Lenient
Moderate
Strict
This project is licensed under the MIT License โ see the LICENSE section for further details.
FAQs
A dynamic password validation system with preconfigured modes and rule-based design
We found that advanced-password-validator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.