Skip to main content

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")  # this login will create captcha
vk_api_handler.Solver.logging = True  # enable logging
vk.auth() # get captcha error and automatically solve it

another way with vk_api:

from vk_captcha import VkCaptchaSolver
from vk_api import VkApi
solver = VkCaptchaSolver(logging=True)  # use logging=False on deploy
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)  # use logging=False on deploy
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,  # keep solving captcha while accuracy < 0.33
    repeat_count=14,  # if we solved captcha with less than minimum_accuracy, then retry repeat_count times
    session=session  # optional parameter. Useful if we want to use proxy or specific headers
)
# or
#answer, accuracy = solver.solve(bytes_data=session.get(url))
print(f"I solved captcha = {answer} with accuracy {accuracy:.4}")

async way:

from vk_captcha import VkCaptchaSolver
import random, asyncio
solver = VkCaptchaSolver(logging=False)  # use logging=False on deploy
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()
...
# solve some captchas
...
time_for1captcha = solver.argv_solve_time
total_solved = solver.TOTAL_COUNT
fail_count = solver.FAIL_COUNT  # you need directly increase it after getting second captcha error

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

Metadata

Release files for vk-captcha 2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vk-captcha 2.0
File Size Uploaded Provenance Actions
vk_captcha-2.0.tar.gz 1.6 MB Without provenance Details for vk_captcha-2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vk-captcha 2.0
File Interpreter ABI Platform Actions
vk_captcha-2.0-py3-none-any.whl Python 3 none any Details for vk_captcha-2.0-py3-none-any.whl

Total release size: 3.3 MB

Release files / vk_captcha-2.0.tar.gz

Download URL vk_captcha-2.0.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
767f82168b637476614aa19ade055a552a4c7b0aa1f48409005041ae45cfd898
BLAKE2b-256 checksum
How to use checksums
b37d3af4b15ccdc06af88c0616e6e6743de35ab6386f5ddf2064125eca75818f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.12

Release files / vk_captcha-2.0-py3-none-any.whl

Download URL vk_captcha-2.0-py3-none-any.whl
Size 1.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
01ed144263980c2677b01729fbce6ea4e2a8e2950e449f13c4a6bbb8f225fb43
BLAKE2b-256 checksum
How to use checksums
f420efa1857c4bb21791f5c351a27dcfe466900437cbc552d4c0e785e1127da1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.12

Security for vk-captcha 2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page