Skip to content
Snippets Groups Projects
Commit 30edf5d0 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

The Human Verification is now triggered by more links

parent 1a80dbe7
No related branches found
No related tags found
No related merge requests found
...@@ -258,6 +258,7 @@ class MetaGer ...@@ -258,6 +258,7 @@ class MetaGer
# Human Verification # Human Verification
$this->results = $this->humanVerification($this->results); $this->results = $this->humanVerification($this->results);
$this->ads = $this->humanVerification($this->ads);
$counter = 0; $counter = 0;
$firstRank = 0; $firstRank = 0;
...@@ -453,19 +454,21 @@ class MetaGer ...@@ -453,19 +454,21 @@ class MetaGer
return $results; return $results;
} }
public function humanVerification($results) public function humanVerification($results){
{
# Let's check if we need to implement a redirect for human verification # Let's check if we need to implement a redirect for human verification
if ($this->verificationCount > 10) { if($this->verificationCount > 10){
foreach ($results as $result) { foreach($results as $result){
$link = $result->link; $link = $result->link;
$day = Carbon::now()->day; $day = Carbon::now()->day;
$pw = md5($this->verificationId . $day . $link . env("PROXY_PASSWORD")); $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->link = $url;
$result->proxyLink = $proxyUrl;
} }
return $results; return $results;
} else { }else{
return $results; return $results;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment