Guest User

Untitled

a guest
Oct 23rd, 2017
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.49 KB | None | 0 0
  1. from uiautomator import device as d
  2. from uiautomator import Device
  3. import os
  4. import time
  5.  
  6.  
  7. """ Settings for uiautomator. Device('') is serial number """
  8. os.environ["ANDROID_HOME"]="C:\Users\joe\AppData\Local\Android\sdk"
  9. d = Device('TA9610ZLF5')
  10. d = Device('TA9610ZLF5', adb_server_host='127.0.0.1', adb_server_port=5037)
  11.  
  12. """ Coordinates for each number 0-9, the showseed button, and the pay button """a
  13. showseed = [585,720]
  14. numbers=[\
  15. [350,940],\
  16. [155,663],\
  17. [352,663],\
  18. [550,663],\
  19. [155,761],\
  20. [360,761],\
  21. [550,761],\
  22. [155,845],\
  23. [360,845],\
  24. [550,845]]
  25. pay = [200,1050]
  26.  
  27. """ Address I sent the money to on a successful try """
  28. aaddress = "1Q5T3Z4skkgDqTZKjQGQJJgdmq3EDUEXUR"
  29.  
  30. """ Coordinates for each click """
  31. def clicker(number):
  32. d.click(number[0],number[1])
  33.  
  34. """ Very simple overall. 6 nested for loops to go through every possible number """
  35. """ The somewhat confusing ifs in each loop allow the user to pick up pintry for """
  36. """ wherever they left off """
  37. # Notes on which pintry's I've tried went here
  38. def main():
  39. pintry = [0,0,0,0,0,0]
  40. for a in range(0,10):
  41. if pintry[0]!=0:
  42. if pintry[0]!=a and (pintry[0]+1)%10!=a: continue
  43. pintry[0] = a
  44. for b in range(0,10):
  45. if pintry[1]!=0:
  46. if pintry[1]!=b and (pintry[1]+1)%10!=b: continue
  47. pintry[1] = b
  48. for c in range(0,10):
  49. if pintry[2]!=0:
  50. if pintry[2]!=c and (pintry[2]+1)%10!=c: continue
  51. pintry[2] = c
  52. for d in range(0,10):
  53. if pintry[3]!=0:
  54. if pintry[3]!=d and (pintry[3]+1)%10!=d: continue
  55. pintry[3] = d
  56. for e in range(0,10):
  57. if pintry[4]!=0:
  58. if pintry[4]!=e and (pintry[4]+1)%10!=e: continue
  59. pintry[4] = e
  60. for f in range(0,10):
  61. if pintry[5]!=0:
  62. if pintry[5]!=f and (pintry[5]+1)%10!=f: continue
  63. pintry[5] = f
  64.  
  65. """ This section was for testing whether or not
  66. there were doubles in the pin being tested--
  67. I was pretty sure my pin had doubles """
  68. #trypin = False
  69. #already = False
  70. #for x in range(0,5):
  71. # if x<4 and (pintry[x]==pintry[x+1]==pintry[x+2]):
  72. # trypin = False
  73. # already = True
  74. # if (pintry[x]==pintry[x+1]) and already:
  75. # trypin = False
  76. # if (pintry[x]==pintry[x+1]) and not already:
  77. # trypin = True
  78. # already = True
  79. #if not trypin: continue
  80.  
  81. print "It has been " + str(time.time() - start) + " seconds"
  82. time.sleep(0.1)
  83. clicker(pay)
  84. clicker(showseed)
  85.  
  86. print "Trying " + str(pintry) + "."
  87. for num in pintry: clicker(numbers[num])
  88.  
  89.  
  90. start = time.time()
  91. main()
  92. #specific()
Add Comment
Please, Sign In to add comment