ruby-2captcha 1.1.5 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rspec_status +16 -7
- data/.ruby-version +1 -1
- data/Gemfile.lock +5 -5
- data/README.md +403 -66
- data/README.ru.md +416 -76
- data/api_2captcha.gemspec +4 -1
- data/examples/alibaba_example.rb +16 -0
- data/examples/altcha_example.rb +12 -0
- data/examples/amazon_waf_example.rb +14 -0
- data/examples/atb_captcha_example.rb +11 -0
- data/examples/audio_example.rb +10 -0
- data/examples/basilisk_example.rb +15 -0
- data/examples/binance_example.rb +17 -0
- data/examples/canvas_example.rb +13 -0
- data/examples/captchafox_example.rb +20 -0
- data/examples/capy_example.rb +11 -0
- data/examples/cloudflare_turnstile_example.rb +15 -0
- data/examples/coordinates_example.rb +12 -0
- data/examples/cut_captcha_example.rb +11 -0
- data/examples/cyber_siara_example.rb +10 -0
- data/examples/datadome_example.rb +12 -0
- data/examples/drag_drop_example.rb +24 -0
- data/examples/friendly_captcha_example.rb +10 -0
- data/examples/funcaptcha_example.rb +10 -0
- data/examples/geetest_example.rb +12 -0
- data/examples/geetest_v4_example.rb +10 -0
- data/examples/grid_captcha_example.rb +14 -0
- data/examples/hcaptcha_example.rb +10 -0
- data/examples/hunt_example.rb +17 -0
- data/examples/key_captcha_example.rb +13 -0
- data/examples/lemin_example.rb +12 -0
- data/examples/media/drag_drop/background.jpeg +0 -0
- data/examples/media/drag_drop/image1.jpeg +0 -0
- data/examples/media/drag_drop/image2.jpeg +0 -0
- data/examples/media/example.mp3 +0 -0
- data/examples/media/normal_2.jpg +0 -0
- data/examples/media/recaptchaGrid4x4.jpg +0 -0
- data/examples/media/recaptchaGridImginstructions4x4.jpg +0 -0
- data/examples/media/temu/body.png +0 -0
- data/examples/media/temu/part1.png +0 -0
- data/examples/media/temu/part2.png +0 -0
- data/examples/media/temu/part3.png +0 -0
- data/examples/mt_captcha_example.rb +10 -0
- data/examples/normal_captcha_example.rb +11 -0
- data/examples/prosopo_example.rb +16 -0
- data/examples/recaptcha_v2_example.rb +10 -0
- data/examples/recaptcha_v3_example.rb +18 -0
- data/examples/rotate_example.rb +13 -0
- data/examples/temu_example.rb +28 -0
- data/examples/tencent_example.rb +10 -0
- data/examples/text_example.rb +10 -0
- data/examples/tspd_example.rb +19 -0
- data/examples/vkcaptcha_example.ru +10 -0
- data/examples/vkimage_example.rb +10 -0
- data/examples/yandex_example.rb +10 -0
- data/examples/yidun_example.rb +15 -0
- data/howto.txt +8 -0
- data/lib/api_2captcha/client.rb +77 -5
- data/lib/api_2captcha/version.rb +1 -1
- metadata +62 -7
data/api_2captcha.gemspec
CHANGED
|
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
|
9
9
|
spec.email = ["info@2captcha.com"]
|
|
10
10
|
|
|
11
11
|
spec.summary = "2Captcha API wrapper for Ruby."
|
|
12
|
-
spec.description = "Ruby package for easy integration with the API of 2captcha captcha solving service to bypass recaptcha,
|
|
12
|
+
spec.description = "Ruby package for easy integration with the API of 2captcha captcha solving service to bypass recaptcha, funcaptcha, geetest and solve any other captchas."
|
|
13
13
|
spec.homepage = "https://2captcha.com/"
|
|
14
14
|
spec.license = "MIT"
|
|
15
15
|
spec.required_ruby_version = ">= 2.6.0"
|
|
@@ -18,6 +18,9 @@ Gem::Specification.new do |spec|
|
|
|
18
18
|
spec.metadata["source_code_uri"] = "https://github.com/2captcha/2captcha-ruby"
|
|
19
19
|
spec.metadata["changelog_uri"] = "https://github.com/2captcha/2captcha-ruby/releases"
|
|
20
20
|
spec.metadata["github_repo"] = "ssh://github.com/2captcha/2captcha-ruby"
|
|
21
|
+
spec.metadata["bug_tracker_uri"] = "https://github.com/2captcha/2captcha-ruby/issues"
|
|
22
|
+
spec.metadata["keywords"] = "2captcha, captcha solver, captcha bypass, Ruby, automation, CAPTCHA API, CAPTCHA recognition, anti-captcha, reCAPTCHA, OCR, image recognition, human verification, bot protection, recaptcha"
|
|
23
|
+
|
|
21
24
|
|
|
22
25
|
# Specify which files should be added to the gem when it is released.
|
|
23
26
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
require_relative '../lib/api_2captcha'
|
|
3
|
+
|
|
4
|
+
client = Api2Captcha.new(ARGV[0])
|
|
5
|
+
|
|
6
|
+
begin
|
|
7
|
+
result = client.alibaba({
|
|
8
|
+
pageurl: "https://example.com/page-with-alibaba",
|
|
9
|
+
scene_id: "SCENE_ID",
|
|
10
|
+
prefix: "PREFIX"
|
|
11
|
+
})
|
|
12
|
+
rescue StandardError => e
|
|
13
|
+
puts(e)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
require 'api_2captcha'
|
|
2
|
+
|
|
3
|
+
client = Api2Captcha.new("YOUR_API_KEY")
|
|
4
|
+
|
|
5
|
+
result = client.altcha({
|
|
6
|
+
pageurl: 'https://mysite.com/page/with/altcha',
|
|
7
|
+
challenge: '{"algorithm":"SHA-256","challenge":"a4c9d8e7f1b23a6c...","signature":"7b3e2a9d5c8f1046e2d91c3a..."}'
|
|
8
|
+
# or:
|
|
9
|
+
# challenge_url: 'https://example.com/altcha-challenge'
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
require 'api_2captcha'
|
|
2
|
+
|
|
3
|
+
client = Api2Captcha.new("YOUR_API_KEY")
|
|
4
|
+
|
|
5
|
+
result = client.amazon_waf({
|
|
6
|
+
sitekey: '0x1AAAAAAAAkg0s2VIOD34y5',
|
|
7
|
+
iv: 'CgAHbCe2GgAAAAAj',
|
|
8
|
+
context: '9BUgmlm48F92WUoqv97a49ZuEJJ50TCk9MVr3C7WMtQ0X6flVbufM4n8mjFLmbLVAPgaQ1Jydeaja94iAS49ljb+sUNLoukWedAQZKrlY4RdbOOzvcFqmD/ZepQFS9N5w15Exr4VwnVq+HIxTsDJwRviElWCdzKDebN/mk8/eX2n7qJi5G3Riq0tdQw9+C4diFZU5E97RSeahejOAAJTDqduqW6uLw9NsjJBkDRBlRjxjn5CaMMo5pYOxYbGrM8Un1JH5DMOLeXbq1xWbC17YSEoM1cRFfTgOoc+VpCe36Ai9Kc=',
|
|
9
|
+
pageurl: 'https://non-existent-example.execute-api.us-east-1.amazonaws.com/latest',
|
|
10
|
+
challenge_script: "https://41bcdd4fb3cb.610cd090.us-east-1.token.awswaf.com/41bcdd4fb3cb/0d21de737ccb/cd77baa6c832/challenge.js",
|
|
11
|
+
captcha_script: "https://41bcdd4fb3cb.610cd090.us-east-1.captcha.awswaf.com/41bcdd4fb3cb/0d21de737ccb/cd77baa6c832/captcha.js"
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
require 'api_2captcha'
|
|
2
|
+
|
|
3
|
+
client = Api2Captcha.new("YOUR_API_KEY")
|
|
4
|
+
|
|
5
|
+
result = client.atb_captcha({
|
|
6
|
+
app_id: "197326679",
|
|
7
|
+
api_server: "api.atb_captcha.com",
|
|
8
|
+
pageurl: "https://mysite.com/page/with/atb_captcha"
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
require_relative '../lib/api_2captcha'
|
|
3
|
+
|
|
4
|
+
client = Api2Captcha.new(ARGV[0])
|
|
5
|
+
|
|
6
|
+
begin
|
|
7
|
+
result = client.basilisk({
|
|
8
|
+
pageurl: "https://example.com/page-with-basilisk",
|
|
9
|
+
sitekey: "SITE_KEY"
|
|
10
|
+
})
|
|
11
|
+
rescue StandardError => e
|
|
12
|
+
puts(e)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
require_relative '../lib/api_2captcha'
|
|
3
|
+
|
|
4
|
+
client = Api2Captcha.new(ARGV[0])
|
|
5
|
+
|
|
6
|
+
begin
|
|
7
|
+
result = client.binance({
|
|
8
|
+
sitekey => "login",
|
|
9
|
+
url => "https://example.com/page-with-binance",
|
|
10
|
+
validate_id => "cb0bfef...e54ecd57b"
|
|
11
|
+
})
|
|
12
|
+
rescue StandardError => e
|
|
13
|
+
puts(e)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
require 'api_2captcha'
|
|
2
|
+
|
|
3
|
+
client = Api2Captcha.new("YOUR_API_KEY")
|
|
4
|
+
|
|
5
|
+
result = client.canvas({
|
|
6
|
+
image: 'path/to/captcha.jpg',
|
|
7
|
+
previous_id: 0,
|
|
8
|
+
lang: 'en',
|
|
9
|
+
hint_image: 'path/to/hint.jpg',
|
|
10
|
+
hint_text: 'Draw around apple'
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
require_relative '../lib/api_2captcha'
|
|
3
|
+
|
|
4
|
+
client = Api2Captcha.new(ARGV[0])
|
|
5
|
+
|
|
6
|
+
begin
|
|
7
|
+
result = client.captchafox({
|
|
8
|
+
sitekey: "sk_vKdD8WGlPF5FKpRDs1U4qTuu6Jv0w",
|
|
9
|
+
pageurl: "https://sinscrire.gmx.fr/",
|
|
10
|
+
api_server: "https://mam.example.com",
|
|
11
|
+
userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
|
|
12
|
+
proxytype: "socks5",
|
|
13
|
+
proxy: "u37d88e6957ca05d6-zone-custom-region-fr:u37d88e6957ca05d6@118.193.59.17:10743"
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
rescue StandardError => e
|
|
17
|
+
puts(e)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
require 'api_2captcha'
|
|
2
|
+
|
|
3
|
+
client = Api2Captcha.new("YOUR_API_KEY")
|
|
4
|
+
|
|
5
|
+
result = client.capy({
|
|
6
|
+
sitekey: 'PUZZLE_Abc1dEFghIJKLM2no34P56q7rStu8v',
|
|
7
|
+
pageurl: 'http://mysite.com/',
|
|
8
|
+
api_server: 'https://jp.api.capy.me/'
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
require 'api_2captcha'
|
|
2
|
+
|
|
3
|
+
client = Api2Captcha.new("YOUR_API_KEY")
|
|
4
|
+
|
|
5
|
+
result = client.turnstile({
|
|
6
|
+
sitekey: "0x0AAAAAAADnPIDROzbs0Aaj",
|
|
7
|
+
data: "7fab0000b0e0ff00",
|
|
8
|
+
pagedata: "3gAFo2...0ME1UVT0=",
|
|
9
|
+
pageurl: "https://2captcha.com/",
|
|
10
|
+
action: "managed",
|
|
11
|
+
userAgent: "Mozilla/5.0 ... Chrome/116.0.0.0 Safari/537.36",
|
|
12
|
+
json: 1
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
require 'api_2captcha'
|
|
2
|
+
|
|
3
|
+
client = Api2Captcha.new("YOUR_API_KEY")
|
|
4
|
+
|
|
5
|
+
result = client.coordinates({
|
|
6
|
+
image: 'path/to/captcha.jpg',
|
|
7
|
+
lang: 'en',
|
|
8
|
+
hint_image: 'path/to/hint.jpg',
|
|
9
|
+
hint_text: 'Connect the dots'
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
require 'api_2captcha'
|
|
2
|
+
|
|
3
|
+
client = Api2Captcha.new("YOUR_API_KEY")
|
|
4
|
+
|
|
5
|
+
result = client.cutcaptcha({
|
|
6
|
+
misery_key: "a1488b66da00bf332a1488993a5443c79047e752",
|
|
7
|
+
api_key: "SAb83IIB",
|
|
8
|
+
pageurl: "https://example.cc/foo/bar.html"
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
require 'api_2captcha'
|
|
2
|
+
|
|
3
|
+
client = Api2Captcha.new("YOUR_API_KEY")
|
|
4
|
+
|
|
5
|
+
result = client.data_dome({
|
|
6
|
+
pageurl: "https://test.com",
|
|
7
|
+
captcha_url: "https://test.com/captcha/",
|
|
8
|
+
proxytype: "http",
|
|
9
|
+
proxy: "proxyuser:strongPassword@123.123.123.123:3128"
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
require_relative "../lib/api_2captcha"
|
|
2
|
+
|
|
3
|
+
client = Api2Captcha.new(ARGV[0])
|
|
4
|
+
|
|
5
|
+
# NOTE: images below are placeholder illustrations, not a real captcha demo.
|
|
6
|
+
backgroundFile = File.expand_path("../media/drag_drop/background.jpeg", __FILE__)
|
|
7
|
+
image1File = File.expand_path("../media/drag_drop/image1.jpeg", __FILE__)
|
|
8
|
+
image2File = File.expand_path("../media/drag_drop/image2.jpeg", __FILE__)
|
|
9
|
+
|
|
10
|
+
backgroundStr = Base64.strict_encode64(File.binread(backgroundFile))
|
|
11
|
+
image1Str = Base64.strict_encode64(File.binread(image1File))
|
|
12
|
+
image2Str = Base64.strict_encode64(File.binread(image2File))
|
|
13
|
+
|
|
14
|
+
begin
|
|
15
|
+
result = client.drag_drop({
|
|
16
|
+
body: backgroundStr,
|
|
17
|
+
images: [image1Str, image2Str],
|
|
18
|
+
textinstructions: "Drag the images to proper position"
|
|
19
|
+
})
|
|
20
|
+
rescue StandardError => e
|
|
21
|
+
puts(e)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
require 'api_2captcha'
|
|
2
|
+
|
|
3
|
+
client = Api2Captcha.new("YOUR_API_KEY")
|
|
4
|
+
|
|
5
|
+
result = client.funcaptcha({
|
|
6
|
+
publickey: "69A21A01-CC7B-B9C6-0F9A-E7FA06677FFC",
|
|
7
|
+
pageurl: "https://mysite.com/page/with/funcaptcha",
|
|
8
|
+
surl: "https://client-api.arkoselabs.com"})
|
|
9
|
+
|
|
10
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
require 'api_2captcha'
|
|
2
|
+
|
|
3
|
+
client = Api2Captcha.new("YOUR_API_KEY")
|
|
4
|
+
|
|
5
|
+
result = client.geetest({
|
|
6
|
+
gt: 'f1ab2cdefa3456789012345b6c78d90e',
|
|
7
|
+
api_server: 'api-na.geetest.com',
|
|
8
|
+
challenge: '12345678abc90123d45678ef90123a456b',
|
|
9
|
+
pageurl: 'https://www.site.com/page/'
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
require 'api_2captcha'
|
|
2
|
+
|
|
3
|
+
client = Api2Captcha.new("YOUR_API_KEY")
|
|
4
|
+
|
|
5
|
+
result = client.grid({
|
|
6
|
+
image: './media/recaptchaGrid4x4.jpg',
|
|
7
|
+
rows: 4,
|
|
8
|
+
cols: 4,
|
|
9
|
+
lang: 'en',
|
|
10
|
+
hint_image: './media/recaptchaGridImginstructions4x4.jpg',
|
|
11
|
+
# hint_text: 'Select all squares with stairs'
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require_relative "../lib/api_2captcha"
|
|
2
|
+
|
|
3
|
+
client = Api2Captcha.new(ARGV[0])
|
|
4
|
+
|
|
5
|
+
begin
|
|
6
|
+
result = client.hunt({
|
|
7
|
+
pageurl: "https://example.com/page-with-hunt",
|
|
8
|
+
api_get_lib: "https://example.com/hd-api/external/apps/app-id/api.js",
|
|
9
|
+
userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36",
|
|
10
|
+
proxytype: "http",
|
|
11
|
+
proxy: "proxyuser:strongPassword@123.123.123.123:3128"
|
|
12
|
+
})
|
|
13
|
+
rescue StandardError => e
|
|
14
|
+
puts(e)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
require 'api_2captcha'
|
|
2
|
+
|
|
3
|
+
client = Api2Captcha.new("YOUR_API_KEY")
|
|
4
|
+
|
|
5
|
+
result = client.keycaptcha({
|
|
6
|
+
s_s_c_user_id: 10,
|
|
7
|
+
s_s_c_session_id: '493e52c37c10c2bcdf4a00cbc9ccd1e8',
|
|
8
|
+
s_s_c_web_server_sign: '9006dc725760858e4c0715b835472f22-pz-',
|
|
9
|
+
s_s_c_web_server_sign2: '2ca3abe86d90c6142d5571db98af6714',
|
|
10
|
+
pageurl: 'https://www.keycaptcha.ru/demo-magnetic/'
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
require 'api_2captcha'
|
|
2
|
+
|
|
3
|
+
client = Api2Captcha.new("YOUR_API_KEY")
|
|
4
|
+
|
|
5
|
+
result = client.lemin({
|
|
6
|
+
captcha_id: 'CROPPED_1abcd2f_a1234b567c890d12ef3a456bc78d901d',
|
|
7
|
+
div_id: 'lemin-cropped-captcha',
|
|
8
|
+
pageurl: 'https://www.site.com/page/',
|
|
9
|
+
api_server: "https://api.leminnow.com/"
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
puts "Result: #{result.inspect}"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
require_relative '../lib/api_2captcha'
|
|
3
|
+
|
|
4
|
+
client = Api2Captcha.new(ARGV[0])
|
|
5
|
+
|
|
6
|
+
begin
|
|
7
|
+
result = client.prosopo({
|
|
8
|
+
pageurl: "https://www.twickets.live/",
|
|
9
|
+
sitekey: "5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNbTwJf1GfN6Xm",
|
|
10
|
+
})
|
|
11
|
+
rescue StandardError => e
|
|
12
|
+
puts(e)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
require_relative '../lib/api_2captcha'
|
|
2
|
+
|
|
3
|
+
client = Api2Captcha.new(ARGV[0])
|
|
4
|
+
|
|
5
|
+
begin
|
|
6
|
+
result = client.recaptcha_v3({
|
|
7
|
+
googlekey: "6LfD3PIbAAAAAJs_eEHvoOl75_83eXSqpPSRFJ_u",
|
|
8
|
+
pageurl: "http://2captcha.com/demo/recaptcha-v3",
|
|
9
|
+
version: "v3",
|
|
10
|
+
score: 0.3,
|
|
11
|
+
action: "verify"
|
|
12
|
+
})
|
|
13
|
+
rescue StandardError => e
|
|
14
|
+
puts(e)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
require 'api_2captcha'
|
|
2
|
+
|
|
3
|
+
client = Api2Captcha.new("YOUR_API_KEY")
|
|
4
|
+
|
|
5
|
+
result = client.rotate({
|
|
6
|
+
image: 'path/to/captcha.jpg',
|
|
7
|
+
angle: 40,
|
|
8
|
+
lang: 'en',
|
|
9
|
+
hint_image: 'path/to/hint.jpg',
|
|
10
|
+
hint_text: 'Put the images in the correct way'
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
require_relative '../lib/api_2captcha'
|
|
3
|
+
|
|
4
|
+
client = Api2Captcha.new(ARGV[0])
|
|
5
|
+
|
|
6
|
+
bodyFile = File.expand_path("../media/temu/body.png", __FILE__)
|
|
7
|
+
part1File = File.expand_path("../media/temu/part1.png", __FILE__)
|
|
8
|
+
part2File = File.expand_path("../media/temu/part2.png", __FILE__)
|
|
9
|
+
part3File = File.expand_path("../media/temu/part3.png", __FILE__)
|
|
10
|
+
|
|
11
|
+
bodyStr = Base64.strict_encode64(File.binread(bodyFile))
|
|
12
|
+
part1Str = Base64.strict_encode64(File.binread(part1File))
|
|
13
|
+
part2Str = Base64.strict_encode64(File.binread(part2File))
|
|
14
|
+
part3Str = Base64.strict_encode64(File.binread(part3File))
|
|
15
|
+
|
|
16
|
+
begin
|
|
17
|
+
result = client.temu({
|
|
18
|
+
body: bodyStr,
|
|
19
|
+
part1: part1Str,
|
|
20
|
+
part2: part2Str,
|
|
21
|
+
part3: part3Str,
|
|
22
|
+
})
|
|
23
|
+
rescue StandardError => e
|
|
24
|
+
puts(e)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
require_relative '../lib/api_2captcha'
|
|
3
|
+
|
|
4
|
+
client = Api2Captcha.new(ARGV[0])
|
|
5
|
+
|
|
6
|
+
begin
|
|
7
|
+
result = client.tspd({
|
|
8
|
+
pageurl: "https://example.com/page-with-tspd",
|
|
9
|
+
tspd_cookie: "TS...",
|
|
10
|
+
html_page_base64: "PGh0bWw+...",
|
|
11
|
+
userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36",
|
|
12
|
+
proxytype: "http",
|
|
13
|
+
proxy: "proxyuser:strongPassword@123.123.123.123:3128"
|
|
14
|
+
})
|
|
15
|
+
rescue StandardError => e
|
|
16
|
+
puts(e)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
require 'api_2captcha'
|
|
2
|
+
|
|
3
|
+
client = Api2Captcha.new("YOUR_API_KEY")
|
|
4
|
+
|
|
5
|
+
result = client.vkcaptcha({
|
|
6
|
+
redirect_uri: 'https://id.vk.com/not_robot_captcha?domain=vk.com&session_token=eyJ....HGsc5B4LyvjA&variant=popup&blank=1',
|
|
7
|
+
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36'
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
puts "Result: #{result.inspect}"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
require_relative '../lib/api_2captcha'
|
|
3
|
+
|
|
4
|
+
client = Api2Captcha.new(ARGV[0])
|
|
5
|
+
|
|
6
|
+
begin
|
|
7
|
+
result = client.yidun({
|
|
8
|
+
pageurl: "https://example.com/page-with-yidun",
|
|
9
|
+
sitekey: "SITE_KEY"
|
|
10
|
+
})
|
|
11
|
+
rescue StandardError => e
|
|
12
|
+
puts(e)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
puts "Result: #{result.inspect}"
|