![](./files/socials.png)
![](./files/donate.png)
Generate passwords and pins without problems! Supports English, Polish and Spanish.
License: GNU General Public License v3.0
The current implementation of the program supports English, Polish, and Spanish translations. However, it would be beneficial to provide support for additional languages to make the program more accessible to users from different linguistic backgrounds.
Implementation Details:
lang
folder, following the same JSON structure as the existing translation files (en.json
, pl.json
, es.json
).Expected Benefits:
Additional Context:
Expanding the language support of the program can attract a broader user base and make it more user-friendly for non-English speakers. This enhancement demonstrates a commitment to inclusivity and user satisfaction.
When the translation file for the user's Windows language is not found, the program prints a message but does not raise a FileNotFoundError
exception. This can lead to incorrect behavior when the translations are missing.
Steps to Reproduce:
Expected Behavior:
If the translation file for the user's Windows language is not found, the program should raise a FileNotFoundError
exception.
Actual Behavior:
The program prints a message but does not raise an exception, resulting in missing translations and potentially incorrect program behavior.
Additional Information:
(Fixed #1)
The clearthis
function in the password generator code uses the os.system
function with a string 'cls, clear', which is not a valid command on most systems. This can cause the code to break or produce unexpected results.
The solution is to replace it with either os.system('cls')
or os.system('clear')
, depending on the operating system being used.
Run the password generator code on a system that uses either the 'cls' or 'clear' command.
Observe the error caused by the incorrect clear screen command.
The screen should be cleared without any errors.
The code raises an error because the clear screen command is not valid.
The code could be made more readable and modular by using helper functions for certain repetitive tasks. By encapsulating these tasks into functions, the main code can become more concise and easier to understand.
Implementation Details:
load_chars_file
to handle the loading of the chars.txt
file. This function should return the contents of the file as a string.load_translation_file
to handle the loading of translation files based on the user's Windows language. This function should take the language code as a parameter and return the parsed JSON data.chars.txt
file, call the load_chars_file
function. Similarly, instead of manually opening and parsing the translation file, call the load_translation_file
function with the appropriate language code.Expected Benefits:
Additional Context:
The proposed changes will make the code more organized and easier to maintain, especially when dealing with file operations and language translations. By encapsulating these tasks into functions, it will also make it easier to modify or extend these functionalities in the future.
The program does not correctly validate the length of the password or PIN entered by the user. It allows lengths outside the specified range (4-100 for passwords and 4-10 for PINs) to be accepted without raising an error.
Steps to Reproduce:
Expected Behavior:
If the user enters a length that is outside the specified range, the program should raise a ValueError
and display an error message.
Actual Behavior:
The program accepts lengths outside the specified range without raising an error, potentially leading to unexpected results.
Additional Information:
When the translation file for the user's Windows language is missing, the program prints a message but does not raise an exception, causing the program to continue executing with missing translations.
Steps to Reproduce:
Run the program without the translation file for the user's Windows language.
Observe the program output.
Expected Behavior:
If the translation file for the user's Windows language is missing, the program should raise a FileNotFoundError exception.
Actual Behavior:
The program prints a message but does not raise an exception, resulting in missing translations and potentially incorrect program behavior.
Additional Information:
Operating System: Windows 10
Language: English
Version: 1.0
The current code uses the secrets module to generate random numbers, but it does not utilize the module to its full potential. The password generator should include a mix of different characters, such as special characters, to make the generated passwords stronger and to make them more secure.
The current logic for generating passwords and PINs can be simplified and made more concise by utilizing Python's built-in functions and libraries.
Implementation Details:
secrets.choice()
function to randomly select characters from the chars
string.secrets.token_urlsafe()
function to generate a secure random URL-safe string of the desired length for passwords. This function eliminates the need for the loop and ensures secure random generation.secrets.token_hex()
function for generating PINs. This function generates a random hexadecimal string, which can be converted to a PIN by extracting the desired number of digits.strtoint()
and checklen()
functions, as the built-in functions and libraries handle the length validation automatically.Expected Benefits:
Additional Context:
By utilizing the built-in functions and libraries, the code for password and PIN generation can be simplified and made more secure. This approach also reduces the chance of introducing errors or vulnerabilities in custom implementation.
The code for the password generator does not validate the input provided by the user, which could lead to unexpected results.
The user should only be able to enter one of the expected values (P, p, I, i, N, or n)
The code accepts any input, which could lead to unexpected results.
Validate the input provided by the user to ensure that it is one of the expected values.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.