Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
BOT_vs_reCAPTCHA.pdf
Hazumi Ichijo
July 05, 2018
Programming
1
410
BOT_vs_reCAPTCHA.pdf
https://omotesandorb.connpass.com/event/91465/
Hazumi Ichijo
July 05, 2018
Tweet
Share
More Decks by Hazumi Ichijo
See All by Hazumi Ichijo
bqv速習会
hazumirr
6
3.3k
Protobuf on Rails Tips
hazumirr
1
600
Before Chaos Engineering
hazumirr
1
600
推薦のためのdata pipelineのモニタリングとロギング
hazumirr
3
4.2k
Goサーバをあえて不安定にするパッケージを作った話
hazumirr
1
1k
gRPC-webのここがすごい という話がしたかった
hazumirr
1
1.1k
rake db:test:prepare ができなかった話
hazumirr
2
830
The Go Playgoroundで 外部パッケージ使いたい
hazumirr
1
4.7k
Rails から Protobuf を使いたくなった話
hazumirr
1
1.3k
Other Decks in Programming
See All in Programming
Vite でお手軽 Vue.js の環境構築
azuki
1
170
エンジニアによる事業指標計測のススメ
doyaaaaaken
1
170
Reactive Java Microservices on Kubernetes with Spring and JHipster
deepu105
1
160
One does not simply: migrating to Android 12 🤯
oleur
1
120
短納期でローンチした新サービスをJavaで開発した話/launched new service using Java
eichisanden
5
1.8k
Keeping your team in top shape with the Gradle Enterprise API
runningcode
3
120
Running Laravel/PHP on AWS (AWS Builders Day Taiwan 2022)
dwchiang
0
130
GitHubのユーザー名を変更した後のあれこれ
tahia910
0
120
ISUCON12 事前講習
rosylilly
3
3.5k
Bootiful multi-model applications with Redis Stack
bsbodden
0
100
Modern Android Developer ~ 안내서
pluu
1
560
シェーダー氷山発掘記
logilabo
0
140
Featured
See All Featured
Ruby is Unlike a Banana
tanoku
91
9.2k
YesSQL, Process and Tooling at Scale
rocio
157
12k
How to train your dragon (web standard)
notwaldorf
58
3.8k
It's Worth the Effort
3n
172
25k
Principles of Awesome APIs and How to Build Them.
keavy
113
15k
Making the Leap to Tech Lead
cromwellryan
113
7.3k
Building Adaptive Systems
keathley
25
1.1k
Practical Orchestrator
shlominoach
178
8.6k
The Art of Programming - Codeland 2020
erikaheidi
32
9k
Automating Front-end Workflow
addyosmani
1351
200k
Scaling GitHub
holman
451
140k
Statistics for Hackers
jakevdp
781
210k
Transcript
©2018 Wantedly, Inc. BOT vs reCAPTCHA 05.July.2018 - Ұᑍ and
Human vs reCAPTCHA
©2018 Wantedly, Inc. ࣗݾհ Ұᑍ!IB[VNJSS !SFSPTU 8FC"QQMJDBUJPO&OHJOFFS 3BJMT 3FBDU ʜ
۴࿏ߴઐஜେֶ8BOUFEMZ
©2018 Wantedly, Inc. BOTͷରࡦͯ͠·͔͢ʁ
©2018 Wantedly, Inc. BOTʹΑΔ߈ܸ త: ECαΠτͳͲͷSEOత ҙ: emailೝূ௨ΔBOT͕͍Δ
©2018 Wantedly, Inc. BOTʹΑΔ߈ܸ త: ECαΠτͳͲͷSEOత ҙ: emailೝূ௨ΔBOT͕͍Δ https://en.wikipedia.org/wiki/CAPTCHA
©2018 Wantedly, Inc.
©2018 Wantedly, Inc. SF$"15$)"
©2018 Wantedly, Inc.
©2018 Wantedly, Inc. ϑϩϯτΤϯυ https://developers.google.com/recaptcha/docs/invisible#auto_render <html> <head> <title>reCAPTCHA demo: Simple
page</title> <script src="https://www.google.com/recaptcha/api.js" async defer></script> <script> function onSubmit(token) { document.getElementById("demo-form").submit(); } </script> </head> <body> <form id='demo-form' action="?" method="POST"> <button class="g-recaptcha" data-sitekey="your_site_key" data-callback='onSubmit'>Submit</button> <br/> </form> </body> </html>
©2018 Wantedly, Inc. ϑϩϯτΤϯυ https://developers.google.com/recaptcha/docs/invisible#auto_render <html> <head> <title>reCAPTCHA demo: Simple
page</title> <script src="https://www.google.com/recaptcha/api.js" async defer></script> <script> function onSubmit(token) { document.getElementById("demo-form").submit(); } </script> </head> <body> <form id='demo-form' action="?" method="POST"> <button class="g-recaptcha" data-sitekey="your_site_key" data-callback='onSubmit'>Submit</button> <br/> </form> </body> </html>
©2018 Wantedly, Inc. JSͰόϦσʔγϣϯ͍ͨ͠ͱ͖ʁ
©2018 Wantedly, Inc. ϑϩϯτΤϯυ ࢀߟ: https://developers.google.com/recaptcha/docs/invisible#programmatic_execute <html> <head> <title>reCAPTCHA demo:
Simple page</title> <script src="https://www.google.com/recaptcha/api.js" async defer></script> <script> function onSubmit(token) { document.getElementById("demo-form").submit(); } function onClick() { // όϦσʔγϣϯΛߦ͏ grecaptcha.execute(); } </script> </head> <body> <form id='demo-form' action="?" method="POST"> <div class="g-recaptcha" data-sitekey="your_site_key" data-callback="onSubmit" data-size="invisible"> </div> <button onClick="onClick" /> </form> </body> </html>
©2018 Wantedly, Inc. ϑϩϯτΤϯυ ࢀߟ: https://developers.google.com/recaptcha/docs/invisible#programmatic_execute <html> <head> <title>reCAPTCHA demo:
Simple page</title> <script src="https://www.google.com/recaptcha/api.js" async defer></script> <script> function onSubmit(token) { document.getElementById("demo-form").submit(); } function onClick() { // όϦσʔγϣϯΛߦ͏ grecaptcha.execute(); } </script> </head> <body> <form id='demo-form' action="?" method="POST"> <div class="g-recaptcha" data-sitekey="your_site_key" data-callback="onSubmit" data-size="invisible"> </div> <button onClick="onClick" /> </form> </body> </html>
©2018 Wantedly, Inc. αʔόαΠυ ࢀߟ: https://developers.google.com/recaptcha/docs/verify conn = Faraday.new(:url =>
'https://www.google.com/') res = conn.post '/recaptcha/api/siteverify', { :secret => ‘RECAPTCHA_SECRET_KEY’, :response => ‘RECAPTCHA_TOKEN’ } is_bot = JSON.parse(res.body)["success"]
©2018 Wantedly, Inc. αʔόαΠυ https://github.com/ambethia/recaptcha/
©2018 Wantedly, Inc. αΫοͱಋೖͰ͖Δʂʁ
©2018 Wantedly, Inc. αΫοͱಋೖͰ͖Δʂʁ => ಋೖͨ͠
©2018 Wantedly, Inc. https://support.google.com/recaptcha/?hl=en#6081880
©2018 Wantedly, Inc. ਓ͔ؒΕͯ͠·͏
©2018 Wantedly, Inc. wਓͰ#PUͱٙΘΕΔ͕࣌͋Δ w Ϣʔβʔʢਓʣ͕͢Δ w ͔Εͨͷ͕CPU͔ਓ͔ؒΘ͔Βͳ͍ w#PUͷΛࣄલʹௐࠪ͢Δ͜ͱ͕ࠔ ͦͷޙɾɾɾ
©2018 Wantedly, Inc. wਓͰ#PUͱٙΘΕΔ͕࣌͋Δ w Ϣʔβʔʢਓʣ͕͢Δ w ͔Εͨͷ͕CPU͔ਓ͔ؒΘ͔Βͳ͍ w#PUͷΛࣄલʹௐࠪ͢Δ͜ͱ͕ࠔ ͦͷޙɾɾɾ
SF$"15$)"WͰશͯղܾʂʁ
©2018 Wantedly, Inc. SF$"15$)"W https://github.com/rerost/recaptcha_v3_demo
©2018 Wantedly, Inc. SF$"15$)"W %&.0
©2018 Wantedly, Inc. SF$"15$)"W // ਓؒ {"success"=>true, "challenge_ts"=>"2018-07-05T06:35:35Z", "hostname"=>"localhost", "score"=>0.9,
“action"=>"demo"} // BOT {"success"=>true, "challenge_ts"=>"2018-07-05T06:36:36Z", "hostname"=>"localhost", "score"=>0.1, "action"=>"demo"}
©2018 Wantedly, Inc. SF$"15$)"W // ਓؒ {"success"=>true, "challenge_ts"=>"2018-07-05T06:35:35Z", "hostname"=>"localhost", "score"=>0.9,
“action"=>"demo"} // BOT {"success"=>true, "challenge_ts"=>"2018-07-05T06:36:36Z", "hostname"=>"localhost", "score"=>0.1, "action"=>"demo"}
©2018 Wantedly, Inc. ·ͱΊ wSF$"15$)"ͷํ͕Ϣʔβʔͷख͕ؒݮΔ wW#PU͕͚Δ͕ίϯόʔδϣϯ͕Լ͕Γ͔Ͷͳ͍ w ਓखͰ͕#05͔ਓ͔ؒͲ͏͔֬ೝ͍͢͠෦ʹಋೖͯ͠νΣοΫͨ͠ w ݪҼը૾λΠϧ͕ग़Δ͜ͱʹΑΔϒϩοΫ
wW#FUB൛͕ͩίϯόʔδϣϯԼ͕Βͳ͍