Python Captcha Solver

edited February 2021 in General
Requires the Requests module.
#!/usr/bin/env python import requests api_url="http://127.0.0.1:80/" api_username="captcha" api_password="sniper" def solve_captcha(captcha_image=""): global api_url,api_username,api_password; data = {"function": "picture2", "username": api_username, "password": api_password} files={'pict': open(captcha_image, 'rb')} request = requests.post(api_url,files=files,data=data) answer = request.content.split("|")[-1] return answer # Solve the captcha solved=solve_captcha("/captcha.png") print(solved)
Sign In or Register to comment.