SHARE
TWEET

Untitled

a guest Sep 17th, 2019 109 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import sys, time
  2.  
  3. def p_check(p):
  4.     if not len(p) == 18:
  5.         raise ValueError("Unknown Password")
  6.     if not(ord(p[3-(2+1)]) <= 90 and ord(p[-2+16-7*2]) >= 65):
  7.         raise ValueError("Unknown Password")
  8.     if not (p[4] == p[8] and ord(p[4]) == 95):
  9.         raise ValueError("Unknown Password")
  10.     if not(p[1] == p[7] and p[1] == p[16]):
  11.         raise ValueError("Unknown Password")
  12.     if not(p[14] == p[16] and chr(ord("a")+4) == p[1]):
  13.         raise ValueError("Unknown Password")
  14.     if not(p[11] == chr(ord("G") ^ 42)):
  15.         raise ValueError("Unknown Password")
  16.     if not(ord(p[13]) ^ (42>>2) == ord("f")):
  17.         raise ValueError("Unknown Password")
  18.     if not(ord(p[15]) ^ (42<<1) == ord("9") - 25):
  19.         raise ValueError("Unknown Password")
  20.     if not(p[15] == p[3]):
  21.         raise ValueError("Unknown Password")
  22.     if not(p[5] == p[10] and ord(p[5]) - 10 == 101):
  23.         raise ValueError("Unknown Password")
  24.     if not(ord(p[3*1-1]) >= 97 and ord(p[3*1-1]) <= 122):
  25.         raise ValueError("Unknown Password")
  26.     if not(ord(p[3*2]) >= 97 and ord(p[3*2]) <= 122):
  27.         raise ValueError("Unknown Password")
  28.     if not(ord(p[3*2]) >= 97 and ord(p[3*3]) <= 122):
  29.         raise ValueError("Unknown Password")
  30.     if not(ord(p[3*4]) >= 97 and ord(p[3*4]) <= 122):
  31.         raise ValueError("Unknown Password")
  32.     if not(ord(p[3*5+2]) >= 97 and ord(p[3*6-1]) <= 122):
  33.         raise ValueError("Unknown Password")
  34.     if not(ord(p[0]) ^ ord(p[2])  == 39):
  35.         raise ValueError("Unknown Password")
  36.     if not(ord(p[2]) ^ ord(p[6]) == 29):
  37.         raise ValueError("Unknown Password")
  38.     if not(ord(p[6]) ^ ord(p[0]) == 58):    
  39.         raise ValueError("Unknown Password")
  40.     if not(ord(p[9]) ^ ord(p[17]) == 7):
  41.         raise ValueError("Unknown Password")
  42.     if not(ord(p[17]) ^ ord(p[12]) == 20):
  43.         raise ValueError("Unknown Password")
  44.     if not(ord(p[12]) ^ ord(p[9]) == 19):
  45.         raise ValueError("Unknown Password")
  46.     if not(ord(p[12]) - ord(p[2]) == -3):
  47.         raise ValueError("Unknown Password")
  48.     print("\n\nValid Password:")
  49.  
  50.  
  51. def bruteforce():
  52.     p =[]
  53.     for ch0 in range(65,97):
  54.         for ch9 in range(97, 123):
  55.             ch2 = ch0 ^ 39
  56.             ch6 = ch2 ^ 29
  57.             ch17 = ch9 ^ 7
  58.             ch12 = ch17 ^ 20
  59.             password = f"{chr(ch0)}e{chr(ch2)}t_o{chr(ch6)}e_{chr(ch9)}om{chr(ch12)}lete{chr(ch17)}"
  60.             try:
  61.                 p_check(password)
  62.                 p.append(password)
  63.                 print(password+"\n")
  64.             except ValueError:
  65.                 sys.stdout.write('\r'+password)
  66.                 sys.stdout.flush()
  67.                 time.sleep(0.01)
  68.                 continue
  69.             except:
  70.                 print("Other error detected")
  71.     print(f"\n{p}")
  72.  
  73. bruteforce()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top