j311yf1sh

JellyCrack! v1.0

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