
Security News
Node.js Homepage Adds Paid Support Link, Prompting Contributor Pushback
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Developed by Infosimples, a brazilian company that offers data extraction solutions and Ruby on Rails development.
ZeroCaptcha is a Ruby API for an enterprise captcha solving service developed by Infosimples that is 100% powered by artificial intelligence software.
Add this line to your application's Gemfile:
gem 'zero_captcha', '~> 1.0.0'
And then execute:
$ bundle
Or install it yourself as:
$ gem install zero_captcha
# Create a client
#
client = ZeroCaptcha.new('mytoken')
There are two methods available: decode and decode! * decode doesn't raise exceptions. * decode! may raise a ZeroCaptcha::Error if something goes wrong.
If the solution is not available, an empty captcha object will be returned.
captcha = client.decode(url: 'http://bit.ly/1xXZcKo', solver: 'captcha-type-1')
captcha.text # Solution of the captcha
captcha.id # Numeric ID of the captcha solved by ZeroCaptcha
captcha.correct? # true if the solution is correct
captcha.duration # How long it took to solve the captcha in milliseconds.
You can also specify path, file, raw and raw64 when decoding an image.
client.decode(path: 'path/to/my/captcha/file', solver: 'captcha-type-1')
client.decode(file: File.open('path/to/my/captcha/file', 'rb'), solver: 'captcha-type-1')
client.decode(raw: File.open('path/to/my/captcha/file', 'rb').read, solver: 'captcha-type-1')
client.decode(raw64: Base64.encode64(File.open('path/to/my/captcha/file', 'rb').read), solver: 'captcha-type-1')
Internally, the gem will always convert the image to raw64 (binary base64 encoded).
captcha = client.report_incorrect(130920620) # with 130920620 as the captcha id
Warning: do not abuse on this method, otherwise you may get banned
captcha = client.report_correct(130920620) # with 130920620 as the captcha id
The API is thread-safe, which means it is perfectly fine to share a client instance between multiple threads.
ZeroCaptcha don't require specific dependencies. That saves you memory and avoid conflicts with other gems.
Any format you use in the decode method (url, file, path, raw, raw64) will always be converted to a raw64, which is a binary base64 encoded string. So, if you already have this format available on your side, there's no need to do convertions before calling the API.
Our recomendation is to never convert your image format, unless needed. Let the gem convert internally. It may save you resources (CPU, memory and IO).
ZeroCaptcha gem uses Semantic Versioning.
This gem has been tested with the following versions of Ruby:
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)All contributors: https://github.com/infosimples/zero_captcha/graphs/contributors
MIT License. Copyright (C) 2011-2015 Infosimples. https://infosimples.com/
FAQs
Unknown package
We found that zero_captcha demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.
Research
Security News
The Socket Research Team investigates a malicious Python typosquat of a popular password library that forces Windows shutdowns when input is incorrect.