captcha

Removing background noisy lines from Captcha Image using PYTHON PIL

故事扮演 提交于 2019-12-03 00:42:58
I have a processed captcha image(Enlarged) look like : As you can see, the font-size of the "TEXT" is bit larger than the width of the Noisy Lines. So I need an algorithm or code to remove the noisy lines from this image. With the help of Python PIL Library and the chopping algorithm mentioned below I din't get the output image which could be easily read by OCRs. Here's Python code that I tried : import PIL.Image import sys # python chop.py [chop-factor] [in-file] [out-file] chop = int(sys.argv[1]) image = PIL.Image.open(sys.argv[2]).convert('1') width, height = image.size data = image.load()

CAPTCHA in java [duplicate]

守給你的承諾、 提交于 2019-12-02 23:16:40
This question already has an answer here: Recommendations for java captcha libraries [closed] 7 answers I wanna give a shot at developing a secure login system in Java. How should I implement CAPTCHA using Java? The three CAPTCHA libraries I've used for Java are: JCaptcha - This is the most configurable of the three, and pretty well documented. But we can't seem to get this to look right, no matter what. It also does audio and other unconventional CAPTCHAs JCaptcha example http://jcaptcha.sourceforge.net/samples/SimpleListImageCaptchaEngineCaptcha_0.jpg http://jcaptcha.sourceforge.net/

How do I set up Scrapy to deal with a captcha

大兔子大兔子 提交于 2019-12-02 20:47:33
I'm trying to scrape a site that requires the user to enter the search value and a captcha. I've got an optical character recognition (OCR) routine for the captcha that succeeds about 33% of the time. Since the captchas are always alphabetic text, I want to reload the captcha if the OCR function returns non-alphabetic characters. Once I have a text "word", I want to submit the search form. The results come back in the same page, with the form ready for a new search and a new captcha. So I need to rinse and repeat until I've exhausted my search terms. Here's the top-level algorithm: Load page

How CURL Login with Captcha and Session

限于喜欢 提交于 2019-12-02 20:42:02
define('COOKIE', './cookie.txt'); define('MYURL', 'https://register.pandi.or.id/main'); function getUrl($url, $method='', $vars='', $open=false) { $agents = 'Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16'; $header_array = array( "Via: 1.1 register.pandi.or.id", "Keep-Alive: timeout=15,max=100", ); static $cookie = false; if (!$cookie) { $cookie = session_name() . '=' . time(); } $referer = 'https://register.pandi.or.id/main'; $ch = curl_init(); if ($method == 'post') { curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT

rails - Choosing captcha plugin [closed]

落花浮王杯 提交于 2019-12-02 15:13:21
There are a lot of captchas plugins in Rails and also many types of solutions for preventing spamming and flooding. So it isn't only Rails question. Let's see what types of plugins do we have: 1. Classic image captcha ( zendesk's Captcha , Simple_captcha, Validates_captcha, winton's Captcha , Raptcha). positive: Can be effective to prevent automatic decrypt (not sure about Simple_captcha, but it seems that both zendesk's and winton's captchas don't achieve that, as they use pre-generated images (instead of on-demand), so our possible spam bots can be learned on that images). negative: Require

How do integrate kaptcha in java spring

人走茶凉 提交于 2019-12-02 12:18:26
I need to integrate kaptcha in java spring, on the official website https://code.google.com/p/kaptcha/wiki/SpringUsage is very old information. You can use reCAPTCHA , follow this tutorial it will help you reCAPTCHA link Add the maven dependency: <dependency> <groupId>com.github.penggle</groupId> <artifactId>kaptcha</artifactId> <version>2.3.2</version> </dependency> Add the kaptcha configurations to the application.properties: #Kaptcha kaptcha.config.imageWidth=310 kaptcha.config.imageHeight=55 kaptcha.config.textProducerCharString=0123456789aAbBcCdDEeFeGgHhIi kaptcha.config

Update 2 exact same images source using javascript

拜拜、爱过 提交于 2019-12-02 10:00:06
I using PHP captcha called Cryptographer captchan.fr site I need to use 2 captcha on same page but i have problem they do get generated but when i click refresh only first one refreshes, refresh code looks like this. document.images.captcha.src='cryptographp.html?cfg=0&&'+Math.round(Math.random(0)*1000)+1; I tried this code but it only works for first one anyway document.getElementById('captcha').src='cryptographp.html?cfg=0&&'+Math.round(Math.random(0)*1000)+1; Now I wanted to do something like this I added name="captcha" to image but this does not work for some reason can someone help me fix

Python - Urllib2 Wait for page to load to scrape data

a 夏天 提交于 2019-12-02 03:02:51
Firstly, I'd like to say that I do not want to use any libraries that are not provided with Python 2.7.10. The same question was posted on Stack Overflow but was answered with the Requests library. I have a script that logs into Roblox.com using urllib2. To check if there is a captcha before I try to log in, I wanted to do check_captcha = re.findall('recaptcha_image', newlogin) but roblox needs to redirect to the captcha login page AND the captcha has to load onto the page. So how can I make Python wait to redirect/load the page fully before I go ahead and .read() and scrape it. This will wait

How to Verify whether a Robot is Entering Information

回眸只為那壹抹淺笑 提交于 2019-12-02 01:28:39
问题 I have a web form which the users fill and the info send to server and stored on a database. I am worried that Robots might just fill in the form and I will end up with a database full of useless records. How can I prevent Robots from filling in my forms? I am thinking maybe something like Stackoverflow's robot detection, where if it thinks you are a robot, it asks you to verify that you are not. Is there a server-side API in Perl, Java or PHP? 回答1: There are several solutions. Use a CAPTCHA.

TODO:Laravel增加验证码

大兔子大兔子 提交于 2019-12-01 23:01:54
TODO:Laravel增加验证码 1. 先聊聊验证码是什么,有什么作用? 验证码(CAPTCHA)是“Completely Automated Public Turing test to tell Computers and Humans Apart”(全自动区分计算机和人类的图灵测试)的缩写,是一种区分用户是计算机还是人的公共全自动程序。可以防止:恶意破解密码、刷票、论坛灌水,有效防止某个黑客对某一个特定注册用户用特定程序暴力破解方式进行不断的登陆尝试,实际上用验证码是现在很多网站通行的方式,我们利用比较简易的方式实现了这个功能。这个问题可以由计算机生成并评判,但是必须只有人类才能解答。由于计算机无法解答CAPTCHA的问题,所以回答出问题的用户就可以被认为是人类。 随着科技的不断进步,图片识别技术的不断提高,出现了机器识别验证码和第三方人为识别验证,普通的验证码已经起不到很全面的防护作用;所以验证码自身也在不多发展,出现了动画验证码,手机短信验证码,手机语音验证码,视频验证码,拼图验证码,问题验证码。 但是验证码给用户代码的体验是不够理想,更多人觉得验证码是多余的。但是为了减少恶意,批量的访问,验证码还是有它出现的理由。 2. Laravel验证码扩展,我使用一个第三方可扩展“mews/captcha”,使用简单,可配置多主题。 3. 配置方法,在composer