Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #############################################################
- # JellyCrack!(plan to change name to Jellybrute) #
- # #
- # Creator: Jellyfish #
- # Version: 1.3 Date: Sunday june 5th 2011 #
- # #
- # Description: #
- # JellyCrack!, is a program that simulates pressing #
- # random button's on the keyboard until it matches #
- # your previously supplied word. #
- # #
- # Instructions: #
- # Run JellyCrack!, and input the letters of your #
- # word one at a time in lowercase. #
- # Example: enter letter "j", Press enter/return, #
- # Enter second letter "e", Press enter/return, #
- # Enter Third letter "l", Press enter/return. #
- # It's that easy. #
- # #
- # Future: #
- # Plan to implement some more stuff, Fix code to make #
- # it faster. #
- # #
- # Used: Attempted to calculate "jellyfish". #
- # went through one billion combo's in 24 hours #
- # never used to calculate anything longer then #
- # 3 letters with success. #
- #############################################################
- #imports
- from math import * #probs dont need lol
- from random import * #imports random
- from sys import exit #imports exit
- import os #import OS to use the "clear" command
- import time
- #Variables And Lists
- NameList = list() #List of letters that the if statements add to
- ListOfName = list() #List holding your letters that you entered
- NameLength = 0 #holds 0 to make the first loop continue.
- Name = len(ListOfName) #Testing to remove the input needed for number of letters
- Numberround = 0 #how long is the list of letters
- testy = 0 #how many loop rotations has passed aka combo's
- CombosPerSecond = 0
- ListOfLetters = ['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']
- #timeVars
- StartTime = time.time()
- EndTime = time.time()
- ElapsedTimeSeconds = 0
- ElapsedTimeMinutes = 0
- ElapsedTimeHours = 0
- #Checking user inputs for word
- while NameLength == 0: #Easiest way to make a do until type loop
- os.system("clear") #clear Screen
- #Print all of the instructions / Titles to the screen
- print " JellyCrack!"
- print " input the letters of your word one at a time in lowercase."
- print " Example: enter letter 'j', Press enter/return"
- print " Enter second letter 'e', Press enter/return"
- print " Enter Third letter 'l', Press enter/return"
- print " When Finished press 'Space' then enter/return\n"
- print " Your current letters are: ",ListOfName,"\n" #print Letters used so far
- #get input
- Namey = raw_input(" Letter Input: ")
- #append your input to
- ListOfName.append(Namey)
- #if it detects user has entered a space it will run this removing the space
- # and adding 1 to namelegnth to break the loop
- if ' ' in Namey:
- ListOfName.remove(' ')#remove the space
- NameLength+= 1
- #input for the number of letters
- Number = raw_input(" How many letters? ")
- ConvNum = int(Number) #turns your input from string > integer
- Numbert = ConvNum + 1 #Plus 1 to converted number so it works for some reason
- # if it doesnt + 1 it will be an endless loop
- #main loop that creates a random int between 1 - 26(alphabetical order)
- #once a number has been given it then cross checks it with its correspeonding
- #letter and appends it to a list
- StartTime = time.time()
- while NameList != ListOfName:
- os.system("clear") #Clear Screen
- #printing Information
- #title
- print "\n JellyCrack! \n"
- #Working
- print " JellyCrack is now wobbling away... \n"
- #Current combination
- print " Current word is: ",NameList,"\n"
- #how many combos have been checked?
- print " Combination's tried: ", testy
- print "\n ",ElapsedTimeHours,"Hour's",ElapsedTimeMinutes,"Minute's",ElapsedTimeSeconds,"Second's"
- print "\n Combo's Per Second:",CombosPerSecond,"\n"
- Letter = randint(0,25) #gets random integer
- #Pretty self explanatory
- NameList.append(ListOfLetters[Letter])
- Numberround+=1 #adds 1 to numberround
- testy+=1 #adds 1 to how many combo's or times this loop has passed
- EndTime = time.time()
- ElapsedTimeTrue = EndTime - StartTime
- ElapsedTimeSeconds = int(ElapsedTimeTrue)
- ElapsedTimeMinutes = ElapsedTimeSeconds / 60 / 60
- ElapsedTimeHours = ElapsedTimeSeconds / 60 /60 / 60
- CombosPerSecond = testy / ElapsedTimeTrue
- #Checks if the list is longer then the letters in our word
- #While List is longer then our number
- while Numberround >= Numbert:
- NameList.pop(0) #remove one from 0 position
- Numberround-= 1 #make length less then our number
- #printing Information
- #Clear screen
- os.system("clear")
- #timestop
- #title
- print "\n JellyCrack! \n"
- #Working
- print " JellyCrack wobbling was a success...\n"
- #word
- print " Your word: ",NameList,"\n"
- print " Combination's taken: ",testy,"\n"
- print " ",ElapsedTimeHours,"Hour's",ElapsedTimeMinutes,"Minute's",ElapsedTimeSeconds,"Second's\n"
- print " Combo's Per Second:",CombosPerSecond,"\n"
- exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement