I thought of brute force crackers earlier today, and I created a pretty simple password creator, and password cracker.
Please note this will strictly be used for playing around and it will not be used for illegal purposes. Any actions of your own with these scripts is your liability.
First, check out the scripts, fairly simple stuff.
local Strings = {"a" , "b", "c", "d", "e", "f", "g", "h", "i", "j", "k" , "l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","1","2","3","4","5","6","7","8","9","0"}
local StringAmount = #Strings
local Password = ""
for i = 1,3 do
local NewNumber = math.random(1, StringAmount)
local Variation = math.random(1,2)
local LetterToAdd = Strings[NewNumber]
if Variation == 1 then
LetterToAdd = string.upper(LetterToAdd)
end
Password = Password .. LetterToAdd
end
print(Password)
script.Parent.Password.Value = Password
And the cracker script if you’d like to see it.
wait(5)
local Strings = {"a" , "b", "c", "d", "e", "f", "g", "h", "i", "j", "k" , "l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","1","2","3","4","5","6","7","8","9","0"}
local PasswordToCheck = script.Parent.Password
local CurrentPassword = ""
local TimeStarted = os.time()
local Attempts = 0
repeat
Attempts += 1
task.wait(0.0001)
CurrentPassword = ""
for i = 1,3 do
local NewNumber = math.random(1, #Strings)
local Variation = math.random(1,2)
local LetterToAdd = Strings[NewNumber]
if Variation == 1 then
LetterToAdd = string.upper(LetterToAdd)
end
CurrentPassword = CurrentPassword .. LetterToAdd
end
print(CurrentPassword)
until CurrentPassword == PasswordToCheck.Value
script["Flight Crash Alarm"]:Play() --I go AFK and do other stuff, so it alerts me once finished. Quite nice.
local TimeEnded = os.time()
local CurrentTime = tostring(TimeEnded-TimeStarted)
print("Password found in " .. CurrentTime .. " seconds!" .. " The password was " .. CurrentPassword .. "!")
print("Attempts = " .. tostring(Attempts))
I did 2 letters, and it took 37 seconds, I’m testing 3 right now…
It brought up a few questions.
What’s the best way to generate a password? Is there something more efficient?
Second, I’ve seen coding youtubers (with other coding languages, doing slightly different thing but also applicable), save their attempts, and not using that password again since they’ve already checked it.
But the problem with my script, is I have to generate it letter by letter. And the only way I’d be able to do it, would be by grabbing a whole password in one go, choosing out of all the possibilities. Do I generate all the possibilites, then pick, and then add them to the table of checked passwords.