vk_captcha
- AI VK captcha solver for 93.2% accuracy
Requirements
Python3.3 - python3.10
Python 3.10 is not supported yet because
onnxruntime
is not supporting python3.10
UPDATE: Python3.10 is supported
Installation
pip install vk_captcha
or
pip install https://github.com/imartemy1524/vk_captcha/raw/main/dist/vk_captcha-1.21.tar.gz
or
pip install git+https://github.com/imartemy1524/vk_captcha
Fast examples:
Look into VkHacker for examples of accounts bruteforce
using vk_api library:
from vk_captcha import vk_api_handler
vk = vk_api_handler.VkApiCaptcha("88005553535", "efwoewkofokw")
vk_api_handler.Solver.logging = True
vk.auth()
another way with vk_api:
from vk_captcha import VkCaptchaSolver
from vk_api import VkApi
solver = VkCaptchaSolver(logging=True)
vk = VkApi(login='', password='', captcha_handler=solver.vk_api_captcha_handler)
vk.method("any.method.with.captcha.will.be.handled")
just solve captcha from url / bytes
from vk_captcha import VkCaptchaSolver
import random, requests
session = requests.Session()
session.headers['User-Agent'] = 'Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0'
solver = VkCaptchaSolver(logging=True)
sid = random.randint(122112, 10102012012012)
easy_captcha = False
url = f"https://api.vk.com/captcha.php?sid={sid}&s={int(easy_captcha)}"
answer, accuracy = solver.solve(
url=url,
minimum_accuracy=0.33,
repeat_count=14,
session=session
)
print(f"I solved captcha = {answer} with accuracy {accuracy:.4}")
async way:
from vk_captcha import VkCaptchaSolver
import random, asyncio
solver = VkCaptchaSolver(logging=False)
async def captcha_solver():
sid = random.randint(122112, 10102012012012)
easy_captcha = False
url = f"https://api.vk.com/captcha.php?sid={sid}&s={int(easy_captcha)}"
answer, accuracy = await solver.solve_async(url=url, minimum_accuracy=0.4, repeat_count=10)
print(f"Solved captcha = {answer} with accuracy {accuracy:.4}")
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
asyncio.run(captcha_solver())
Also, you can get some statistics of solving captcha:
from vk_captcha import VkCaptchaSolver
solver = VkCaptchaSolver()
...
...
time_for1captcha = solver.argv_solve_time
total_solved = solver.TOTAL_COUNT
fail_count = solver.FAIL_COUNT
In theory, for other languages you can use command line solver ( NOT RECOMMENDED, it will always load model again):
python -m vk_captcha -url "https://api.vk.com/captcha.php?sid=2323832899382092" -minimum-accuracy 0.33 -repeat-count 13