j311yf1sh

JellyCrack! V1.2

Jun 5th, 2011
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 7.32 KB | None | 0 0
  1. #############################################################
  2. #       JellyCrack!(plan to change name to Jellybrute)      #
  3. #                                                           #
  4. #       Creator: Jellyfish                                  #
  5. #       Version: 1.2       Date: Sunday june 5th 2011       #
  6. #                                                           #
  7. #      Description:                                         #
  8. #      JellyCrack!, is a program that simulates pressing    #
  9. #      random button's on the keyboard until it matches     #
  10. #      your previously supplied word.                       #
  11. #                                                           #
  12. #      Instructions:                                        #
  13. #      Run JellyCrack!, and input the letters of your       #
  14. #      word one at a time in lowercase.                     #
  15. #      Example: enter letter "j", Press enter/return,       #
  16. #      Enter second letter "e", Press enter/return,         #
  17. #      Enter Third letter "l", Press enter/return.          #
  18. #      It's that easy.                                      #
  19. #                                                           #
  20. #      Future:                                              #
  21. #      Plan to implement some more stuff, Fix code to make  #
  22. #      it faster.                                           #
  23. #                                                           #
  24. #      Used: Attempted to calculate "jellyfish".            #
  25. #      went through one billion combo's in 24 hours         #
  26. #      never used to calculate anything longer then         #
  27. #      3 letters with success.                              #
  28. #############################################################
  29.  
  30. #imports
  31. from math import * #probs dont need lol
  32. from random import * #imports random
  33. from sys import exit #imports exit
  34. import os #import OS to use the "clear" command
  35. import time
  36.  
  37. #Variables And Lists
  38. NameList = list() #List of letters that the if statements add to
  39. ListOfName = list() #List holding your letters that you entered
  40. NameLength = 0 #holds 0 to make the first loop continue.
  41. Name = len(ListOfName) #Testing to remove the input needed for number of letters
  42. Numberround = 0 #how long is the list of letters
  43. testy = 0 #how many loop rotations has passed aka combo's
  44. CombosPerSecond = 0
  45. #timeVars
  46. StartTime = time.time()
  47. EndTime = time.time()
  48. ElapsedTimeSeconds = 0
  49. ElapsedTimeMinutes = 0
  50. ElapsedTimeHours = 0
  51. #Checking user inputs for word
  52. while NameLength == 0: #Easiest way to make a do until type loop
  53.    
  54.     os.system("clear") #clear Screen
  55.    
  56.     #Print all of the instructions / Titles to the screen
  57.     print "                             JellyCrack!"
  58.     print "         input the letters of your word one at a time in lowercase."
  59.     print "         Example: enter letter 'j', Press enter/return"
  60.     print "         Enter second letter 'e', Press enter/return"
  61.     print "         Enter Third letter 'l', Press enter/return"
  62.     print "         When Finished press 'Space' then enter/return\n"
  63.     print "         Your current letters are: ",ListOfName,"\n" #print Letters used so far
  64.  
  65.     #get input
  66.     Namey = raw_input("         Letter Input: ")
  67.  
  68.     #append your input to
  69.     ListOfName.append(Namey)
  70.  
  71.     #if it detects user has entered a space it will run this removing the space
  72.     # and adding 1 to namelegnth to break the loop
  73.     if ' ' in Namey:
  74.         ListOfName.remove(' ')
  75.         NameLength+= 1
  76.  
  77. #input for the number of letters
  78. Number = raw_input("How many letters? ")
  79. ConvNum = int(Number) #turns your input from string > integer
  80. Numbert = ConvNum + 1 #Plus 1 to converted number so it works for some reason
  81.                       # if it doesnt + 1 it will be an endless loop
  82.  
  83.  
  84. #main loop that creates a random int between 1 - 26(alphabetical order)
  85. #once a number has been given it then cross checks it with its correspeonding
  86. #letter and appends it to a list
  87.  
  88. StartTime = time.time()
  89.  
  90. while NameList != ListOfName:
  91.  
  92.  
  93.     os.system("clear") #Clear Screen
  94.     #printing Information
  95.  
  96.     #title
  97.     print "\n                             JellyCrack! \n"
  98.     #Working
  99.     print "                  JellyCrack is now wobbling away... \n"
  100.     #Current combination
  101.     print "                  Current word is: ",NameList,"\n"
  102.     #how many combos have been checked?
  103.     print "                  Combination's tried: ", testy
  104.     print "\n                 ",ElapsedTimeHours,"Hour's",ElapsedTimeMinutes,"Minute's",ElapsedTimeSeconds,"Second's"
  105.     print "\n                  Combo's Per Second:",CombosPerSecond,"\n"
  106.     Letter = randint(1,26) #gets random integer
  107.  
  108.     #Pretty self explanatory
  109.     if Letter == 1:
  110.         NameList.append('a')
  111.  
  112.     if Letter == 2:
  113.         NameList.append('b')
  114.            
  115.     if Letter == 3:
  116.         NameList.append('c')
  117.  
  118.     if Letter == 4:
  119.         NameList.append('d')
  120.  
  121.     if Letter == 5:
  122.         NameList.append('e')
  123.  
  124.     if Letter == 6:
  125.         NameList.append('f')
  126.  
  127.     if Letter == 7:
  128.         NameList.append('g')
  129.  
  130.     if Letter == 8:
  131.         NameList.append('h')
  132.  
  133.     if Letter == 9:
  134.         NameList.append('i')
  135.  
  136.     if Letter == 10:
  137.         NameList.append('j')
  138.        
  139.     if Letter == 11:
  140.         NameList.append('k')
  141.        
  142.     if Letter == 12:
  143.         NameList.append('l')
  144.        
  145.     if Letter == 13:
  146.         NameList.append('m')
  147.        
  148.     if Letter == 14:
  149.         NameList.append('n')
  150.        
  151.     if Letter == 15:
  152.         NameList.append('o')
  153.        
  154.     if Letter == 16:
  155.         NameList.append('p')
  156.        
  157.     if Letter == 17:
  158.         NameList.append('q')
  159.        
  160.     if Letter == 18:
  161.         NameList.append('r')
  162.        
  163.     if Letter == 19:
  164.         NameList.append('s')
  165.        
  166.     if Letter == 20:
  167.         NameList.append('t')
  168.        
  169.     if Letter == 21:
  170.         NameList.append('u')
  171.        
  172.     if Letter == 22:
  173.         NameList.append('v')
  174.        
  175.     if Letter == 23:
  176.         NameList.append('w')
  177.        
  178.     if Letter == 24:
  179.         NameList.append('x')
  180.        
  181.     if Letter == 25:
  182.         NameList.append('y')
  183.        
  184.     if Letter == 26:
  185.         NameList.append('z')
  186.  
  187.  
  188.     Numberround+=1 #adds 1 to numberround
  189.     testy+=1 #adds 1 to how many combo's or times this loop has passed
  190.     EndTime = time.time()
  191.  
  192.     ElapsedTimeTrue = EndTime - StartTime
  193.     ElapsedTimeSeconds = int(ElapsedTimeTrue)
  194.     ElapsedTimeMinutes = ElapsedTimeSeconds / 60
  195.     ElapsedTimeHours = ElapsedTimeMinutes / 60
  196.     CombosPerSecond = testy / ElapsedTimeTrue
  197.    
  198.     #Checks if the list is longer then the letters in our word
  199.     #While  List is longer then our number
  200.     while Numberround >= Numbert:
  201.         NameList.pop(0) #remove one from 0 position
  202.         Numberround-= 1 #make length less then our number
  203.  
  204. #printing Information
  205.  
  206. #Clear screen
  207.  
  208. os.system("clear")
  209.  
  210. #timestop
  211.  
  212.  
  213. #title
  214. print "\n                             JellyCrack! \n"
  215. #Working
  216. print "                  JellyCrack wobbling was a success...\n"
  217. #word
  218. print "                  Your word: ",NameList,"\n"
  219. print "                  Combination's taken: ",testy,"\n"
  220. print "                  ",ElapsedTimeHours,"Hour's",ElapsedTimeMinutes,"Minute's",ElapsedTimeSeconds,"Second's\n"
  221. print "                  Combo's Per Second:",CombosPerSecond,"\n"
  222.  
  223. exit()
Add Comment
Please, Sign In to add comment