Categories > WeAreDevs > Hangout >

Scratch Password Generator

Huddy

ScriptVault coming soon

vip

Posts: 310

Threads: 18

Joined: Apr, 2022

Reputation: 19

Posted

Ik no one asked but I made this for a school project and thought that I did pretty good and thought I would share it

https://scratch.mit.edu/projects/750317521/

  • 0

Discord Contact : fatty__joe

Posts: 1256

Threads: 84

Joined: Feb, 2021

Reputation: 75

Replied

Fire stuff vouch works as intended pretty cool

  • 0

https://media.discordapp.net/attachments/1013939973671624917/1027279180192292944/unknown.png
https://media.discordapp.net/attachments/1010670716062007347/1108945330847883274/image.png

Abhidjt

Abhidjt

Posts: 10

Threads: 2

Joined: Nov, 2022

Reputation: 0

Replied

Thats Cool especially since you managed to do that in scratch

  • 0

Its a me Abhidjt!

I am currently making a modified Version of WRD Template (ik nobody cares) but

https://github.com/LeontKing2/WRD-ExploitAPI-Template-Modified

Alternate

stop take my rice

vip

Posts: 711

Threads: 115

Joined: Mar, 2022

Reputation: 36

Replied

I'm no scratcher but, while it does work, this is the code you used to specify how many times a character should be chosen:

https://ibb.co/KLvbXSp

+ a lot more of those same "join" blocks.

Why do that when you could do this:

https://ibb.co/FxmmMHP

 

EDIT: I was bored so decided to write this same thing but in Python. I explained every line using comments, so maybe this can help you learn or something? I don't know, but here it is:

import random # Imports the module for generating random numbers

pw = "" # Declaring the password variable outside of the loop so that it can be accessed globally by different instances of the loop.
wow = ["!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "-", "+", "="] # Declaring an "array" or list of possible characters that can be put in the password. This can be modified to add or take away more.
idx = len(wow) # idx is referring to "index", but we use that same variable name later so we'll just put this as idx. This gets the length of "wow", which is the list of possible characters. You'll see why this will be useful later on.
times = 0 # Declaring the times variable outside of the loop so that it can be accessed globally by different instance of the loop.
index = 0 # Declaring the times variable outside of the loop so that it can be accessed globally by different instances of the loop.
option = "" # Declaring the option variable outside of the loop so that it can be accessed globally by different instances of the loop.
repeat = True # Determines whether the loop of generating passwords should continue or not.
print("Generating password...") # Initial console text the user will see, which will be preceded by the generating of a password.
while repeat == True: # Declaring the loop as to which passwords will be generated.
    pw = "" # Clearing the password variable so they don't generate on top of each other.
    times = 0 # Clearing the times variable so that the loop can proceed without times remaining 14, which would then not allow the loop to run properly causing the password to not generate.
    while times < 14: # Replicating the function of a for loop since Python doesn't have one.
        index = random.randint(0, idx - 1) # Setting index to a random number between 0 and the length of the character list.
        pw = pw + wow[index] # Adding the current value of pw with the character in thelist that has been selected by the randomly generated number.
        times = times + 1 # Increasing the value of times by 1 so that way it will know when to stop, otherwise we'd have an infinite loop because the while condition would never be met.
    print("Finished generating password.") # Printing that it finished generating. These lines of code will be run once the while loop has finished.
    print("Password: " + pw) # Printing the generated password.
    print("Do you want to generate another password? (Y/N)") # Asking if the user would like to generate another password.
    option = input() # Getting user input.
    if option == "N" or option == "n": # If they say no:
        print("Thank you for using Alternate's password generator.") # Tell the user thank you and give me credits for this code.
        repeat = False # Turn the repeat variable False so that the initial while loop condition will no longer be met, hence the password generator loop will be cancelled, hence no more passwords will be generated.
    elif option == "Y" or option == "y": # If they say yes:
        print("Generating new password...") # Simply print generating a new password and the loop will take care of the rest.
    else: # If they say none of the options:
        print("An appropriate answer was not inputted. Generating new password...") # Tell the user they did not input a valid answer and simply resort to generating another password.

You can pop this into an online Python compiler to test it, it works really good actually.

  • 0

we are dead

ThisOneGuyHere

OneGuyHere

vip

Posts: 298

Threads: 22

Joined: Mar, 2022

Reputation: 24

Replied

Vouch, Certainly works.

  • 0

"And it'll be a long time, before you ever see me again"

Posts: 1996

Threads: 198

Joined: Apr, 2021

Reputation: 13

Replied

Vouch, seems cool, especially since made in Scratch lmao

  • 0

Random quote here...

Posts: 659

Threads: 39

Joined: Feb, 2020

Reputation: 10

Replied

Pretty useful. Nice release

  • 0

 

 

 

Posts: 1391

Threads: 71

Joined: May, 2022

Reputation: 17

Replied

pov: you have a phd in scratch

  • 1

Did I mention I use arch btw?

Huddy

ScriptVault coming soon

vip

Posts: 310

Threads: 18

Joined: Apr, 2022

Reputation: 19

Replied

@Hiroku Thank you 

  • 0

Added

@Abhidjt It was pretty easy to do just alot of copying lol

  • 0

Added

@Alternate Thank you I will be sure to update it so its simplier also cool python im also in a class for that

  • 0

Added

@Alternate Second message I just realized the code you send and it would work if you want a 2 digit code lol 

  • 0

Discord Contact : fatty__joe

Alternate

stop take my rice

vip

Posts: 711

Threads: 115

Joined: Mar, 2022

Reputation: 36

Replied

@Huddy

What do you mean it would work if you want a two-digit code?

  • 0

we are dead

Huddy

ScriptVault coming soon

vip

Posts: 310

Threads: 18

Joined: Apr, 2022

Reputation: 19

Replied

@Alternate I tested the code on scratch and it just repeated 2 digits 

  • 0

Discord Contact : fatty__joe

Cxruppted

type cxver

vip

Posts: 55

Threads: 9

Joined: Sep, 2022

Reputation: 6

Replied

v o u c h, Epic work bro!

  • 0

not really active anymore

Next >>>

Users viewing this thread:

( Members: 0, Guests: 2, Total: 2 )