repl.it
@druceb/

Brute Force

Python

No description

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
48
49
50
51
52
53
54
55
56
57
58
59
from random import randint
def combinations():
  chars = ["q","w","e","r","t","y","u","i","o","p","a","s","d","f","g","h","j","k","l","z","x","c","v","b","n","m","Q","W","E","R","T","Y","U","I","O","P","A","S","D","F","G","H","J","K","L","Z","X","C","V","B","N","M","1","2","3","4","5","6","7","8","9","0","`","¬","!",'"',"£","$","%","^","&","*","(",")","-","_","=","+","[","{","]","}",";",":","'","@","#","~",",","<",".",">","/","?","|",""]
  randomNum = randint(0,10)
  brute = []
  count = 0 
  password = str(input("Password: "))
  pass__ = list(password)
  skip = True
  passlen = len(password)
  if randomNum == 7:
    rand(password)
  else:
    hack(chars,brute,count,pass__,skip,passlen)

def rand(pass_):
  print("Your password is: ", pass_)

def hack(chrs,brt,cnt,pas,skp,length):
  for a in range(0,96):
    brt.append(chrs[a])
    
    for b in range(0,96):
      brt.append(chrs[b])
      
      for c in range(0,96):
        brt.append(chrs[c])
        
        for q in range(0,96):
          brt.append(chrs[q])
          if brt[0:length] != pas:
            brt.pop()
            cnt += 1
            print(brt)
          else:
            complete(brt,length)
        brt.pop()
      brt.pop()
    brt.pop()
  brt.pop()


def complete(brt,length):
#  if length == 1:
#    brtAsString = brt[0]
#  elif length == 2:
#    brtAsString = brt[0]+brt[1]
#  elif length == 3:
#    brtAsString = brt[0]+brt[1]+brt[2]
#  else:
#    brtAsString = brt[0]+brt[1]+brt[2]+brt[3]
  brtAsString = brt.join("[]'',")
  print(" ")
  print("Correct Password:", brtAsString)
  print("---------------------")
  print(" ")
  combinations()
    
combinations()
Fetching token
?