
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
A Python package for validating emails, phone numbers, password strength checking, strong password generation, and file validation.
SurakshaMitra 🔐 is your security companion for managing passwords 🔑 and validating email 📨 addresses as well as file uploader 🗃️ and phone 📞 validatore.
Install SurakshaMitra using pip:
pip install SurakshaMitra
To check the strength of a password, use the check_strength() function:
from SurakshaMitra.password_strength import check_strength
password = "YourPassword123!"
result = check_strength(password)
print(result)
This will output the strength of the password as one of the following categories:
-Weak
-Average
-Medium
-Strong
-Very Strong
To generate a strong password, use the generate_password() function:
from SurakshaMitra.password_generator import generate_password
password = generate_password(length=12) # Specify the length of the password
print("Generated Password:", password)
This will generate a random, strong password with a mix of characters, numbers, and special symbols.
To validate an email address, use the validate_email() function:
from SurakshaMitra.email_validator import validate_email
email = "example@example.com"
is_valid = validate_email(email)
if is_valid:
print(f"{email} is a valid email address.")
else:
print(f"{email} is not a valid email address.")
To validate a phone number for all countries, use the validate_phone_number()
function:
from SurakshaMitra.phone_validator import validate_phone_number
phone_number = "+1 123-456-7890" # Example number
is_valid = validate_phone_number(phone_number)
if is_valid:
print(f"{phone_number} is a valid phone number.")
else:
print(f"{phone_number} is not a valid phone number.")
If the phone number is valid, it will return True, otherwise False.
To validate file uploads based on size and file type, use the validate_file_upload() function:
from SurakshaMitra.file_upload_validator import validate_file_upload
file_path = "example.pdf"
allowed_types = ["pdf", "jpg", "png"] # Specify allowed file extensions
max_size_mb = 5 # Set maximum file size in MB
is_valid = validate_file_upload(file_path, allowed_types, max_size_mb)
if is_valid:
print(f"{file_path} is a valid file upload.")
else:
print(f"{file_path} is not allowed.")
This will check if the file meets the allowed types and size limit.
☕ For any issues or questions, feel free to raise an issue in the GitHub repository.
check_strength()
function to evaluate the strength of a password.generate_password()
function to create a strong password.validate_email()
to check if an email address is formatted correctly.validate_phone_number()
function checks if a phone number is valid for all countries.validate_file_upload()
ensures that uploaded files meet specific size and type restrictions.We welcome contributions! Feel free to submit a pull request or open an issue in our GitHub repository.
FAQs
A Python package for validating emails, phone numbers, password strength checking, strong password generation, and file validation.
We found that SurakshaMitra 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.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.