File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,10 @@ void option_telegram() {
135135}
136136
137137void option_password () {
138+
139+ /* Use a seed */
140+ srand (time (NULL ));
141+
138142 std::cout << ansi::GREEN << " Valid choice!" << ansi::RESET << " \n " ;
139143 std::cout << ansi::CYAN << " Enter password length: " << ansi::RESET;
140144 std::string length;
@@ -155,7 +159,7 @@ void option_password() {
155159 }
156160 std::string password = " " ;
157161 for (int i = 0 ; i < length_int; i++) {
158- const std::string charset = " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*()_+-=[]{}|;:,.<>?" ;
162+ const std::string charset = " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*()_+-=[]{}|;:,.<>?~/ " ;
159163 password += charset[rand () % charset.length ()];
160164 }
161165 std::cout << ansi::GREEN << " Generated password: " << ansi::RESET << password << " \n " ;
You can’t perform that action at this time.
0 commit comments