Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
bf86daa8
Commit
bf86daa8
authored
Sep 03, 2018
by
Dominik Hebeler
Browse files
The Human Verification is now triggered by more links
parent
56775e92
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/MetaGer.php
View file @
bf86daa8
...
...
@@ -258,6 +258,7 @@ class MetaGer
# Human Verification
$this
->
results
=
$this
->
humanVerification
(
$this
->
results
);
$this
->
ads
=
$this
->
humanVerification
(
$this
->
ads
);
$counter
=
0
;
$firstRank
=
0
;
...
...
@@ -453,19 +454,21 @@ class MetaGer
return
$results
;
}
public
function
humanVerification
(
$results
)
{
public
function
humanVerification
(
$results
){
# Let's check if we need to implement a redirect for human verification
if
(
$this
->
verificationCount
>
10
)
{
foreach
(
$results
as
$result
)
{
if
(
$this
->
verificationCount
>
10
){
foreach
(
$results
as
$result
){
$link
=
$result
->
link
;
$day
=
Carbon
::
now
()
->
day
;
$pw
=
md5
(
$this
->
verificationId
.
$day
.
$link
.
env
(
"PROXY_PASSWORD"
));
$url
=
route
(
'humanverification'
,
[
'mm'
=>
$this
->
verificationId
,
'pw'
=>
$pw
,
"url"
=>
urlencode
(
base64_encode
(
$link
))]);
$url
=
route
(
'humanverification'
,
[
'mm'
=>
$this
->
verificationId
,
'pw'
=>
$pw
,
"url"
=>
urlencode
(
str_replace
(
"/"
,
"<<SLASH>>"
,
base64_encode
(
$link
)))]);
$proxyPw
=
md5
(
$this
->
verificationId
.
$day
.
$result
->
proxyLink
.
env
(
"PROXY_PASSWORD"
));
$proxyUrl
=
route
(
'humanverification'
,
[
'mm'
=>
$this
->
verificationId
,
'pw'
=>
$proxyPw
,
"url"
=>
urlencode
(
str_replace
(
"/"
,
"<<SLASH>>"
,
base64_encode
(
$result
->
proxyLink
)))]);
$result
->
link
=
$url
;
$result
->
proxyLink
=
$proxyUrl
;
}
return
$results
;
}
else
{
}
else
{
return
$results
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment