File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
web_programming/recaptcha_verification Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 20
20
use Mojo::UserAgent;
21
21
22
22
# Add your 'Secret Key' here
23
- $ENV {' CAPTCHA_V2_SECRET_KEY' } = " 6LeYxBsaAAAAADckp07ST4i2KTU3--4mPFVEinLE " ;
23
+ $ENV {' CAPTCHA_V2_SECRET_KEY' } = " " ;
24
24
25
25
sub is_valid_captcha {
26
26
my ($c ) = @_ ;
@@ -66,9 +66,7 @@ sub is_valid_captcha {
66
66
67
67
helper ua => sub {
68
68
my $ua = Mojo::UserAgent-> new;
69
- $ua -> transactor-> name(
70
- ' Mozilla/5.0 (Windows NT 6.1; WOW64; rv:77.0) Gecko/20190101 Firefox/77.0' );
71
- $ua -> insecure(1);
69
+ $ua -> transactor-> name(' Mozilla/5.0 (Windows NT 6.1; WOW64; rv:77.0) Gecko/20190101 Firefox/77.0' );
72
70
return $ua ;
73
71
};
74
72
@@ -119,7 +117,6 @@ sub is_valid_captcha {
119
117
@@ index.html.ep
120
118
<html>
121
119
<head>
122
- <link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">
123
120
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
124
121
</head>
125
122
<body>
@@ -134,7 +131,7 @@ sub is_valid_captcha {
134
131
<br /><br />
135
132
<label>password:</label> <%= password_field 'password' %>
136
133
<br /><br />
137
- <div class="g-recaptcha" data-sitekey="6LeYxBsaAAAAAEFYISkPQh7t5MptnN0YpkQaVNn6 "></div>
134
+ <div class="g-recaptcha" data-sitekey="<Your Site Key> "></div>
138
135
%= submit_button 'Log in', id => 'submit'
139
136
%= end
140
137
</body>
Original file line number Diff line number Diff line change 18
18
use warnings;
19
19
use Mojolicious::Lite;
20
20
use Mojo::UserAgent;
21
+ use Data::Dumper;
21
22
22
23
# Add your 'Secret Key' here
23
24
$ENV {' CAPTCHA_V3_SECRET_KEY' } = " " ;
@@ -119,8 +120,6 @@ sub is_valid_captcha {
119
120
@@ index.html.ep
120
121
<html>
121
122
<head>
122
- <link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">
123
- <script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
124
123
<script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=<Your Site Key>"></script>
125
124
</head>
126
125
<body>
You can’t perform that action at this time.
0 commit comments