Advertisement
Mlxa

Brute

Jul 8th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.62 KB | None | 0 0
  1. from urllib import request
  2. from time import sleep
  3. from random import randint
  4. import string
  5.  
  6. lst = []
  7. cnt = 0
  8.  
  9. def check(s):
  10.   global lst, cnt
  11.   cnt += 1
  12.   print(s)
  13.   if cnt % 10 == 0:
  14.     print("found: ", *lst)
  15.   try:
  16.     obj = request.urlopen('http://dshpr.com/' + s + '.html')
  17.     lst += [s]
  18.     return True
  19.   except Exception:
  20.     return False
  21.  
  22. st = string.ascii_lowercase
  23. for a in st:
  24.     check(a)
  25. for a in st:
  26.   for b in st:
  27.     check(a + b)
  28. for a in st:
  29.   for b in st:
  30.     for c in st:
  31.       check(a + b + c)
  32. for a in st:
  33.   for b in st:
  34.     for c in st:
  35.       for d in st:
  36.         check(a + b + c + d)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement