Simple Password Generator in Python

Simple Password Generator in Python

NeuralNine

3 года назад

89,168 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Erhan Akun
Erhan Akun - 26.07.2023 11:31

What application is he using?

Ответить
Digital Crack
Digital Crack - 18.06.2023 05:57

what would be the code if you want numbers and/or letter to be duplicated or even show up 3+ in the same code?

Ответить
Joe Morris
Joe Morris - 26.05.2023 03:10

how do you on this generator make capital letters less as i only need 1

Ответить
MrBody Bag
MrBody Bag - 05.05.2023 00:28

I set it up to do 394 as length so it is my full screen then set the amount to one billion it has been ten minuets and it is still going 😅

Ответить
Nils
Nils - 03.05.2023 10:13

fucking legend

Ответить
Original Jokester
Original Jokester - 18.04.2023 06:49

worked like a charm, thanks alot!

Ответить
Kozma Jan
Kozma Jan - 03.03.2023 18:37

or just write: password = ''.join(random.choices(string.ascii_letters + string.digits + string.punctuation, k=number of characters in your password))

Ответить
Joyce Johnson
Joyce Johnson - 11.01.2023 17:04

Facebook

Ответить
IQ07
IQ07 - 25.12.2022 23:14

I kinda made a cleaner version ty for the video


import string
import secrets

alphabet = string.ascii_lowercase + string.ascii_uppercase + string.punctuation + string.digits

password = ''.join(secrets.choice(alphabet) for i in range(25))
print (password)

Ответить
Julian Mahler
Julian Mahler - 14.12.2022 16:10

One-liner:
print(__import__('base64').b85encode(__import__('os').urandom(16)).decode('utf-8'))

Ответить
Kostas Chatzikyriakos-Svokos
Kostas Chatzikyriakos-Svokos - 13.12.2022 16:52

Hello, please tell us which command can we add to create a password and use at every random only one time each character?
Thank you!

Ответить
SR
SR - 29.11.2022 18:29

We can use .shufflle

Ответить
Latino Web Studio
Latino Web Studio - 15.10.2022 21:34

great video! Is there a way to make it a strong password or are those strong passwords? Or is strong password generator just a hype term to get more views?

Ответить
Ryan Schmutzler
Ryan Schmutzler - 17.09.2022 02:21

Thanks for making this task easier to understand.

Ответить
Fedor
Fedor - 16.09.2022 14:10

thank you so much <3
i am trying to learn python, helped me a lot

Ответить
Haardzz
Haardzz - 18.07.2022 00:47

Hey I am new to coding, in the video he says that .sample does not use the same character twice. Is there any function or whatever .sample is called that allows you to use it multiple times? Lets say I wanted to make a 100 character long password, for example. How could I achieve this? Is the only way generating 10 amount 10 length passwords and putting them all together?

Ответить
Krish Arora
Krish Arora - 10.07.2022 22:58

Thx for all the great content

Ответить
Keith Rudolph
Keith Rudolph - 05.07.2022 17:10

Great video, thanks.

Ответить
ThatKidZerr YT
ThatKidZerr YT - 30.06.2022 21:24

This is my favorite so far

Ответить
Mhentoro
Mhentoro - 19.04.2022 22:22

i get this error when i try to start it:

line 14
all =
^
SyntaxError: invalid syntax

do you know how to fix it?

Ответить
Banele Ndlovu
Banele Ndlovu - 10.04.2022 22:18

thank you very much .. i used infinite loop , n it creates many passwords ....

Ответить
pot toker
pot toker - 26.03.2022 23:40

Education is not the filling of a pail but the lighting of a fire?

Ответить
Sharky
Sharky - 07.03.2022 22:30

good tutorial thanks

Ответить
Hamza Rashid
Hamza Rashid - 14.01.2022 14:26

Good Tutorial

Ответить
Kuzee
Kuzee - 30.12.2021 08:35

What app did you use? I want to make one :)))

Ответить
Sandun Galappaththi
Sandun Galappaththi - 03.12.2021 17:55

Tnx

Ответить
Ameya Mahadev Gonal
Ameya Mahadev Gonal - 30.06.2021 14:19

Neuralnine channel is heavily underrated...

Ответить
D & J
D & J - 22.06.2021 12:54

And how to use this for hack Instagram Password????

Ответить
Nothing Special
Nothing Special - 17.06.2021 16:14

What app is that you programming in?

Ответить
SquareBox
SquareBox - 15.06.2021 15:46

This is great!

Ответить
Abhinav Choudhary
Abhinav Choudhary - 14.05.2021 09:33

Nice

Ответить
DiegoNap
DiegoNap - 03.04.2021 12:37

Issues comes when lenght > 10 and only numbers = True
raise ValueError("Sample larger than population or is negative") ValueError: Sample larger than population or is negative

Ответить
DrSpooglemon
DrSpooglemon - 26.03.2021 17:35

from string import ascii_uppercase as uppercase_letters

Ответить
Luigi Cotocea
Luigi Cotocea - 26.03.2021 16:20

It would be nice if you could build a nice gui!

Ответить
Multishep
Multishep - 12.03.2021 15:02

wow thanks it worked

Ответить
spofeta
spofeta - 25.02.2021 13:45

I'm new to programming, can someone explain to me this part, like why and how it works?



all = ""


if upper:
all += uppercase_letters
if lower:
all += lower_letters
if nums:
all += digits
if syms:
all += symbols

Ответить
-ルナール-
-ルナール- - 16.02.2021 13:50

lol can't you import string to get letters and numbers and symbol strings

Ответить
Akhil Nalluri
Akhil Nalluri - 15.02.2021 01:05

This helped so much. Thank you

Ответить
Anita Gairola
Anita Gairola - 31.01.2021 14:14

Bro instead of making variables for letters and symbols we can import string module...
and then...

set1 = string.ascii_letters
set2 = string.ascii_lowercase
set3 = string.ascii_uppercase
set4 = string.punctuation
set5 = string.digits
these includes every punctuation marks, lowercase and uppercase letter and digits

Ответить
Abood Technology
Abood Technology - 24.01.2021 06:34

I have some notes on this.
first: you shouldn't use (random) module for security purposes. as they have mentioned in the documentation it uses pseudo-random generators which isn't safe instead use (secrets) module that is much safer.

second: instead of writing all letters and digits and special characters manually we have (string) module which provide :

string.ascii_lowercase
string.ascii_uppercase
string.punctuation
string.digits

This is my script for generating passwords it's just a cleaner version of the one you made:
import string
import secrets

def generate(length=25, lower=True, upper=True, digits=True, punctuation=True):
char_set = ''

if lower: char_set += string.ascii_lowercase
if upper: char_set += string.ascii_uppercase
if digits: char_set += string.digits
if punctuation: char_set += string.punctuation

return ''.join([secrets.choice(char_set) for i in range(length)])

if _name_ == "__main__":
print(generate())

I really appreciate your effort, i found your channel recently and you helped me alot, keep the good work.

Ответить
bong dodo tan
bong dodo tan - 18.01.2021 11:36

can you make a tutorial converting hash160 hex to base58? thankyou

Ответить
Kashy
Kashy - 31.12.2020 23:48

Hey NeuralNine, what happened to the other ten videos in this Hacking Projects playlist? I was just working thru one of them yesterday evening! Now it looks like only the PW Generator and Exe Conversion videos are still up.

Ответить
Saika Rahman
Saika Rahman - 26.12.2020 19:20

Nice idea ... I actually had made one before ... But when I saw this video I thought I could upgrade that ... And just upgraded it .. Now it generates a password ., Asks if I wanna save it and if I wanna ... It saves into my passwords.db file which I created using sqlite3 ..

Ответить
Mocha
Mocha - 13.12.2020 02:09

Is this possible for Visual Studio Code, but obviously in Python language?

Ответить
Herlon Costa
Herlon Costa - 06.12.2020 03:47

My solution:

import random
import string


letters = string.ascii_letters
digits = string.digits
symbols = string.punctuation

all_chars = letters + digits + symbols
length, amount = 20, 10

for x in range(1, amount + 1):
password = ''.join(random.sample(all_chars, length))
print(f'{x}º: {password}')

Ответить
Herlon Costa
Herlon Costa - 06.12.2020 03:24

Great activity to train knowledge. Congratulations for your job!

Ответить
Dennis Müller
Dennis Müller - 05.12.2020 00:26

I just want to mention that you shouldn't use the random module in a security relevant context. A better option is the secrets module or os.urandom()

Ответить
Zelatrix
Zelatrix - 02.12.2020 18:41

Is there any particular reason you seem to be doing this the hard way instead of just using string.ascii_letters and string.digits?

Ответить