Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- import pyautogui
- import keyboard
- import datetime
- from PIL import Image
- password = 1
- #счётчик попыток ввода, для переключения слотов с едой
- counter = 0
- window = Tk()
- window.title("Взломщик паролей для Rust")
- l_start = Label(window, text="Начать подбор с пароля:")
- l_end = Label(window, text="Закончить подбор на пароле: ")
- w,h = pyautogui.size()
- w=w//2
- h=h//2
- def screen():
- global w, h, password
- s = pyautogui.screenshot()
- s = s.convert("RGB")
- flag = False
- for i in range(-30,30,1):
- r,g,b = s.getpixel((w+40,h+i))
- if 215 < r < 255 and 60 < g < 120 and 60 < b < 110:
- flag = True
- break
- if not flag:
- exit("You are dead, or you gone from keylock!")
- for i in range(-30,30,1):
- r,g,b = s.getpixel((w,h+i))
- if 145 < r < 200 and 220 < g < 250 and 115 < b < 160:
- f = open("password.txt",'a')
- f.write(str(datetime.datetime.now())+"\n")
- f.write(str(password).zfill(4)+'\n')
- f.close()
- exit("Successful hack!\n Password: " + str(password).zfill(4))
- with open("bad_passwords.txt",'a') as f:
- f.write(str(password)+'\n')
- def enter_pass(p):
- # открывает меню ввода пароля
- pyautogui.keyDown("E")
- pyautogui.sleep(0.5)
- pyautogui.keyUp("E")
- #вводит пароль
- for i in str(p).zfill(4):
- pyautogui.press(i)
- pyautogui.sleep(0.05)
- #проверяет удалось ли угадать пароль
- screen()
- def abort():
- if keyboard.is_pressed("UP"):
- exit("Ended, using emergency button.")
- def hacking():
- global window, e_start, e_end
- start = int(e_start.get())
- end = int(e_end.get())
- #ждёт 5 сек
- pyautogui.sleep(5)
- for i in range(start,end,1):
- password = i
- enter_pass(password)
- pyautogui.sleep(0.5)
- #вместо 20 можешь вписать другую цифру, которая +- соответствует количеству еды в стаке
- pyautogui.press(str(counter//20 + 1))
- pyautogui.sleep(0.5)
- counter = counter + 1
- for i in range(0,10):
- pyautogui.sleep(1)
- abort()
- b_start = Button(window,text="Начать подбор",command=hacking)
- e_start = Entry(window,width=30)
- e_end = Entry(window,width=30)
- def w():
- global window, b_start, e_start, e_end
- l_start.grid(row=0,column=0)
- e_start.grid(row=0,column=1)
- l_end.grid(row=1,column=0)
- e_end.grid(row=1,column=1)
- b_start.grid(row=2,column=1)
- l_current.grid(row=3,column=0)
- window.mainloop()
- w()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement