赞
踩
验证码识别一直都是一个重要的话题,近日有一些公司询问 本地DLL验证码识别定制的事,可以联系QQ:【167231471】定制本地离线DLL验证码识别。另外给大家普及一下通用验证码识别和滑块缺口检测的解决方案【网易、极验、腾讯滑块】返回坐标:点击进入无限打码OCR网站,如果调用量比较大,建议购买本地验证码识别DLL。
如果需要识别滑块,请参考官网OCR的开发文档
其它:本地DLL验证码识别如 文字点选、图标点选、OCR文字识别等请联系QQ:167231471
import json import requests # 待识别的验证码图片,转化为Base64图片 img = 'iVBORw0KGgoAAAANSUhEUgAAAKAAAABGCAYAAABL0p+yAAASWElEQVR42u3dA3BtSRcF4Mw/tm3btm3btu2psWdqbNu2bdu2rf7r66pOde7LTS7OTTKZs6tOvZf3ck/6nF6999pr7+60hdJK60VrK19BaSUASysBWFppJQBLKwFYWmklAEsrAVha37bPPvssnHXWWWGDDTYI88wzTzjqqKPCDTfcEG677bZwxx13hPvvvz889dRT4fPPPw9//vlnCcDSmrcvv/wyXHXVVWGjjTYKo446ahhooIHar6GGGiqMPPLIYbzxxgtTTDFFmG222cISSywRbrrppvDLL7+UACytfvv777/Dyy+/HA444ICw3HLLRdANNthgEXBtbW01XWussUZ4/vnnoxf8559/+h4ADa4vDqy0EA466KAw66yzhpFGGikCr1bQ5dfggw8e1lxzzfDggw+GH3/8se8BcIEFFgh33nlnXG0lEHvPeKjffvutwxyYm67ANf7444cVVlgh7LPPPuGMM84IJ510UjjyyCPDfvvtF7beeusw88wzhyGGGCJ+7/DDDx+22GKL+P99yRu2/e9//wtzzDFHJK19maz2JxN1Lr744ujhdtxxx7DrrruG4447Llx77bXhlltuiXNxzTXXRD6Xh9thhx02huLTTjstfPDBB+Gvv/6K1x9//BHB+9NPP4Vvv/02Jh7vvvtuuP322yM4Z5pppjDIIIPEeww55JBh2WWXDa+//np0Or0OwGGGGSYObJpppolu2gOVVpxJAADulFNOCSuvvHLkccAgNA499NDRM/kzgWzEEUcMc889d5hxxhnbw+6UU04ZTj755Agq90vRqhYv9vvvv4e77747LLbYYmHQQQeN9/PnkksuGe655574/73pDdsOP/zwMNZYY8WB+fPqq68Ov/76a4mcAsxivv7668Pqq68eJppoovZw2NmVstnKfxeGZbLff/99UzTpww8/DBtuuGH7GPwsmbKsmgftNQBy2Vy6F2RQVujxxx8fXXlpjRmQCHGbbbZZB++WrqmnnjomBsIjTrbHHntEj8TTpYjkmnzyycOZZ54Zfvjhh8Ky6htvvDEmNgnspBvj+Oqrr3pPhuHxbr755jDBBBO0D2r//fcPX3zxRYmmBib5/fffD5tuumk7+ITS2WefPRxyyCHhpZdeitmo0IezfffddxFgvOWtt94aNTyfGXjggcOCCy4YPv7448K98gsvvBC22mqrMMIII7SDffrpp49hvqejX1ulm55hhhni6pCcyKT6Yurel004O/XUU2MkMbH43qKLLhoTDNWLaiFUArj44ovH9+5zEsPLL7+8ZYnhN998E44++ugw4YQTtoNwuOGGCwcffHBMYnoFgMxL2mSTTWLGZVB4wpNPPlk391AOuuKKK8Ibb7zxnwLgO++8E5Zeeun2rFMYFfa6q0YoownNPjPKKKNEb6ny0Wpv/dBDD0Ww51x0+eWXjxSiVwAIaPjAgQceGDOyBMJnnnmm5psKLwA4ySSTxM+PNtpo8aFwy7feeqtfA5CSkKgMEOJ63UURofj000+PmbFwvfDCC4cHHnigx8b80UcfhfXXX79DEjTxxBOH6667ruWqSFtXq4OwmUA411xzhddee61mTwiAY4899gAEXIj3wP3VPDcPlp73sMMO6xaAPJ1FLvwK3cccc0zT1Ie6QWM84ogjwqWXXholnK50P1xUwpMUkaSKuI9w3SqppttaMM9nRdKO5p9//khgazHyw5xzztmp5CDE91duSUhOodS18cYbRwmlmuF4l112WVysEo+FFloohsVmJ5yYTU9M45h22mnjnHTHX2mDeUjW5LDWWmuFTz75pHcAmHjhLrvsEkOKAdXCCa24ccYZp6ruRZjtr6U/JbL8WYXYas/KKwFpEohlpzLRIt6NeUris2v00UePIKvl3scee2yH+jN6QCMues5q7oaxivWcSU5wOr1oP//8c5dcSNmomtAKnFZ+fzS1WN4sPavFW03Seuyxx6Lc4vtwRyU6ZbUijHfFu8lqaSy4HpmoFrnmrrvuilEvgdh9lA1RqKKAWFc7lkFx7eqJVgR+01l2Z3AAS35ID47fTDbZZO3yREpOita5+oLxeEps6Tl5EnXfzgCiiSCJz2q27733XqFjkRBKKNNYLIzNN9+8ps+aR2Bbd911O3h0Qvann37a8wBM9vjjj0d+Z2Wsuuqq4c033+w0BHvQ3I3jkqoDk046afu/rbLKKjG56YtmApDzRsRZzQV5EqalaqWVVopiM2mKXOPaYYcd2nv8tt122+idig5zkhzCeIpAaJTxAWetnlTJLp83l+qNruseB6AXZKVqBTeQcccdN/KD3HhGJZ58wLJD8gKBNfeMQNgXOjPefvvt+KKJsbiYa88994zPUa8B7b777tsuLCca4uskS6299tphlllmafdMIsYJJ5wQS6Pnn39+ePTRRwurTKBLMu00FjVhGXs9nhRvr+TyhGwev0cBmIymt+KKK8aBjDHGGJEXJuXeAxNT87SetnTOOedEIowX5d0ZwnlPtYNZQCb21VdfjRMtCbC6eSJj4SFc+YtWNajX0BChV529niZSyR6Q6lCab775wk477RQTimbfj8iV9xjKjLVs1eJxfc8ll1wSw28+VgtKltxo9aTplnyeTrdHApIJTStGF0c+WKvOCk88aZlllunwf1deeWWPANDYnn766bgING0qQeWeKr/w3VSmagToFhtPphMlcb16WuoTIEUPHhK1aWbh8fJ5V46MvZZQjP+jDklkz7Pj1KsIoPVGskL2hCim77777pF4AyHx0r9ddNFFcYLzhkrhLXVe0BQXWWSRDt0fmiJabQAhQ6/sVNEAqmfPGM8777wozArBBN3VVlutqQXimZ999tl4X/s00Jc8IeN9xxxzzEhniP95Fp17G5koiaRRHRUIVV1yfmpxaHDt7nP33Xdf5H35mGTJGhksKjwXjxUZawViYZuSSAeIrRfpwp8Q1FwL5E3WW2+9DhoYEKa6c+IUraqBeonurY09n1ShyKTyDqhDao/PSbgQ0ywfS02kvKLtkxacBSs5sfmIiC2CqECRvIReFahKj+n94s3NRC3yTH4/jSddmbm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H2DMxXaVFuJsVydh/RvMlgVcMwegExM0HhR5XkxbkSsmnSOTLjyiq1MBOuOQ7pNPaBJv8695xnrumxsNjhfNAU2QdqSafjfcBhgJvkIeodWWRqE1l47IKxaI+1hoeB+eK9PtCzv8mk0kLaK0HyZdnEnRzRuFAFA/WJ6mC0Xqt/UeQuTBlYMqd15VhgGbmRo5VlbYAzA0IRdz/Z08I0PHEYGpqzHk2auOYLVrobg/nK8tWwc0HDbn8SpYrfiFN4UAEAHHg+hWQrDf0INsN5JFewE2/9DQqv1uDF3N9m804gF5TsKqKk2+F6XarrjOQMdDO3bNwutPv1nAu7dlIZeqJCKSyFYdHtCSSghS3UwY8iKU60gPeQt6viIlNjxOvVqY703HVSjo57Xh7i4hSeXB5isNE/3hcCXz5D3ybuSzvFLk0sGjMtNrx7P1luFgdo4RsPMW9FwOkIykX1sAVJIdV1cnQCXAWtFAqO8Nh6vkO3k2buM66ae/HNxOYsGjlfckUt6jhCPvXkd1SEOUjVZan/5dcVamtiWEv7O6soyU/MGT0c7OPvvsqEPK4GTUOmokBsRbmWzijSQfUo5de8BXLdTLaGV9PEDytv3B8m0JnVVjJFe21erz67UTUvuKCXVWqEZI3ghY6HjVyleJoyklqbDYzijpcAiQvRO+rsyq89Kc5k6iuGbMRhtG+7KJKtV+PwngkbwI6K3sEvpXATCZjFrZTi1YlkoW6ez0gM4uWa7kCHfs7DMmQEhXFdG7x2P21xNc8WvVFbKT5EIEQUO222672Geo57LWQyz/UwBMhNnL8Se5xmrNT53qLJOVxTltgawigdB5IpwDnNCtaVaYNTH/ZcO5e0O//Nf+vmCVBlscyQY8olUMaLqshVFNC6ocyLaMmgANaPQsXTm6SdSgJTHlbwntPes3v7AaiDQVCCGyPCePOnEg7cpPtdfK9v/SSgCWVgKwtNJKAJZWArC00koAllYCsLTSSgCWVgKwtNJKAJZWArC00koAltYP7f/bObOnOGN3DwAAAABJRU5ErkJggg==' # 接口 全局headers headers = { 'Content-Type': 'application/json' } # 登录验证码识别接口 resp = requests.post('http://51learn.vip:3001/pub/login', data=json.dumps({'username': '账号', 'pwd': '密码'}), headers=headers) # 登录接口返回 print('#登录接口返回') print(resp.json()) token = resp.json()['data']['authentication'] print('#token') print(token) # 头部加入token headers['Authorization'] = 'Bearer %s' % token # 开始验证码图片识别 resp = requests.post('http://51learn.vip:3001/yzm/letter_number/reg', data=json.dumps({'captchaData': img}), headers=headers) print('#验证码识别接口返回') print(resp.json()) # 识别结果 print('#识别结果') print(resp.json()['data'])
识别结果:
#登录接口返回
{'state': 0, 'type': 'SUCCESS', 'code': 200, 'message': '登录成功', 'data': {'authentication': '855c927a94b14f833dea27bed59b3759'}}
#token
855c927a94b14f833dea27bed59b3759
#验证码识别接口返回
{'state': 0, 'type': 'SUCCESS', 'code': 200, 'message': '识别成功', 'data': 'acsy'}
acsy
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。