wiby_bot.py 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. from securimage_solver import CaptchaApi
  2. import requests
  3. from PIL import Image
  4. from io import BytesIO
  5. import os, random, time
  6. import threading,logging
  7. from concurrent.futures import ThreadPoolExecutor
  8. captchaSolver = CaptchaApi()
  9. def MAIN(INDEX):
  10. while True:
  11. try:
  12. # print("Thread number:", INDEX)
  13. s = requests.Session()
  14. # r = s.get("https://wiby.me/submit/")
  15. a = s.get("https://wiby.me/securimage/securimage_show.php")
  16. image_data = a.content
  17. # image = Image.open(BytesIO(image_data))
  18. # image.show()
  19. captchaResult = captchaSolver.predict( image_data )
  20. data={ 'url': 'https://'+str(random.randint(10000000,99999000))+'.com/', 'worksafe': random.choice(['on','off']), 'captcha_code': captchaResult }
  21. r = s.post("https://wiby.me/submit/", data=data)
  22. if 'Completed Submission' in r.text:
  23. # print("Completed Submission")
  24. main.amount_submited += 1
  25. else:
  26. main.bad_luck += 1
  27. except:
  28. pass
  29. def STATUS():
  30. while True:
  31. time.sleep(2)
  32. print(f"Spammed times: {str(main.amount_submited)}\nErrors and a awful luck: {main.bad_luck}")
  33. threads = list()
  34. def task(e):
  35. # logging.info("Main : create and start thread %d.", index)
  36. x = threading.Thread(target=MAIN, args=(e,))
  37. threads.append(x)
  38. x.start()
  39. print("hey", e)
  40. class funny_bot():
  41. amount_submited = 0
  42. bad_luck = 0
  43. def start(self):
  44. xy = threading.Thread(target=STATUS, args=())
  45. threads.append(xy)
  46. xy.start()
  47. # with ThreadPoolExecutor(max_workers=50000) as e:
  48. # e.map(MAIN, range(20))
  49. for x in range(200):
  50. task(x)
  51. main = funny_bot()
  52. main.start()