@argthe1st/

Brute Force v2

Python

This is the fastest one ive made so far

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
from string import printable, whitespace
from time import time
from datetime import timedelta

one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve, thirteen, fourteen, fifteen = [None]*15
allWheels = [one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve, thirteen, fourteen, fifteen]

class Wheel:
    wheels = []

    def __init__(self, info):
        self.info = [i for i in info]
        self.pos = 0
        self.max = False
        Wheel.wheels.append(self)
        self.location = Wheel.wheels.index(self)
        print('Wheel '+str(self.location+1)+' added')

    @property
    def value(self):
        return self.info[self.pos]

    def turn(self):
        self.pos+=1
        self.max = True if self.pos > len(self.info)-1 else False
        if self.max:
            if self.location != len(Wheel.wheels)-1:
                self.pos = 0
                Wheel.wheels[self.location+1].turn()
            else:
                print('Adding a wheel...')
                self.pos = 0
                allWheels[self.location+1] = Wheel(printable.replace(whitespace,' '))
                
def display(startTime, tries):
    endTime = time() 
    print("It took me " + str(tries)+" tries and "+ str(timedelta(seconds = (endTime - startTime)))+" seconds to brute force your password")
    exit()    

def HackPass(password='pass'):
    startTime, tries = time(), 0
    one = Wheel(printable.replace(whitespace,' '))
    while True:
        tries += 1
        blah = display(startTime, tries) if ''.join([str(i.value) for i in Wheel.wheels]) == password else Wheel.wheels[0].turn()

HackPass()